summaryrefslogtreecommitdiff
path: root/virt/kvm
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-12-20 18:32:04 (GMT)
committerTejun Heo <tj@kernel.org>2010-12-20 18:32:04 (GMT)
commitc8efcc2589464ac70255bb83e10cad61c7c6d295 (patch)
treea7f9c975831344ba78d3a2f9d252749d0479ca2b /virt/kvm
parented41390fa57a21d06e6e3a3c4bc238bab8957fbb (diff)
downloadlinux-c8efcc2589464ac70255bb83e10cad61c7c6d295.tar.xz
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 'virt/kvm')
0 files changed, 0 insertions, 0 deletions