diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-20 19:32:04 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-20 19:32:04 +0100 |
commit | c8efcc2589464ac70255bb83e10cad61c7c6d295 (patch) | |
tree | a7f9c975831344ba78d3a2f9d252749d0479ca2b /arch/tile/kvm | |
parent | workqueue: deprecate cancel_rearming_delayed_work[queue]() (diff) | |
download | linux-c8efcc2589464ac70255bb83e10cad61c7c6d295.tar.xz linux-c8efcc2589464ac70255bb83e10cad61c7c6d295.zip |
workqueue: allow chained queueing during destruction
Currently, destroy_workqueue() makes the workqueue deny all new
queueing by setting WQ_DYING and flushes the workqueue once before
proceeding with destruction; however, there are cases where work items
queue more related work items. Currently, such users need to
explicitly flush the workqueue multiple times depending on the
possible depth of such chained queueing.
This patch updates the queueing path such that a work item can queue
further work items on the same workqueue even when WQ_DYING is set.
The flush on destruction is automatically retried until the workqueue
is empty. This guarantees that the workqueue is empty on destruction
while allowing chained queueing.
The flush retry logic whines if it takes too many retries to drain the
workqueue.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'arch/tile/kvm')
0 files changed, 0 insertions, 0 deletions