Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1407698
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] gpu: drm: amd: amdkfd: Remove create_workqueue() |
| Date | 2016-05-26 22:20 +0200 |
| Message-ID | <rD9V7-2sa-15@gated-at.bofh.it> (permalink) |
| References | <rD9iq-1Yf-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, May 27, 2016 at 01:07:33AM +0530, Bhaktipriya Shridhar wrote: > alloc_workqueue replaces deprecated create_workqueue(). > > create_workqueue has been replaced with alloc_workqueue with max_active > as 0 since there is no need for throttling the number of active work items. > > WQ_MEM_RECLAIM has not been set to because kfd_process_wq will not be used in > memory reclaim path. > > kfd_process_wq is used for delay destruction. A work item embedded in > kfd_process gets queued to kfd_process_wq and when it executes it > destroys and frees the containing kfd_process and thus itself. > > This requires a dedicated workqueue because a work item once queued, may > get freed at any point of time and any external entity cannot > flush the work item. So, in order to wait for such a work item, > it needs to be put on a dedicated workqueue. > > kfd_module_exit() calls kfd_process_destroy_wq which ensures that all > pending work items are finished before the module is removed. > > flush_workqueue is unnecessary since destroy_workqueue() itself calls > drain_workqueue() which flushes repeatedly till the workqueue becomes empty. > > Hence flush_workqueue has been removed. > > Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Thanks. -- tejun
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] gpu: drm: amd: amdkfd: Remove create_workqueue() Bhaktipriya Shridhar <bhaktipriya96@gmail.com> - 2016-05-26 21:40 +0200
Re: [PATCH v2] gpu: drm: amd: amdkfd: Remove create_workqueue() Tejun Heo <tj@kernel.org> - 2016-05-26 22:20 +0200
Re: [PATCH v2] gpu: drm: amd: amdkfd: Remove create_workqueue() Oded Gabbay <oded.gabbay@gmail.com> - 2016-05-29 17:10 +0200
Re: [PATCH v2] gpu: drm: amd: amdkfd: Remove create_workqueue() Bhaktipriya Shridhar <bhaktipriya96@gmail.com> - 2016-05-29 17:50 +0200
csiph-web