–       glob->swap_queue = create_singlethread_workqueue(“ttm_swap”);


–       flush_workqueue(glob->swap_queue);

–       destroy_workqueue(glob->swap_queue);

+       flush_work(&glob->work);


–       queue_work(glob->swap_queue, &glob->work);

+      schedule_work(glob->swap_queue, &glob->work);

  • swap_queue was created to handle shrinking in low memory situations.


  • Earlier, a separate workqueue was used in order to avoid other workqueue tasks from being blocked since work items on swap_queue spend a lot of time waiting for the GPU.


  • Since these long-running work items aren’t involved in memory reclaim in any way, system_long_wq has been used.


  • Work item has been flushed in ttm_mem_global_release() to ensure that nothing is pending when the driver is disconnected.


Used when the queued work items are long running and don’t require any special flags.



One thought on “system_long_wq

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s