summaryrefslogtreecommitdiffstats
path: root/kernel/nsproxy.c
diff options
context:
space:
mode:
authorTejun Heo2012-07-17 21:39:27 +0200
committerTejun Heo2012-07-17 21:39:27 +0200
commitbc2ae0f5bb2f39e6db06a62f9d353e4601a332a1 (patch)
tree3f1aa1f72566ac67234799fdd811ba63297de33c /kernel/nsproxy.c
parentworkqueue: use mutex for global_cwq manager exclusion (diff)
downloadkernel-qcow2-linux-bc2ae0f5bb2f39e6db06a62f9d353e4601a332a1.tar.gz
kernel-qcow2-linux-bc2ae0f5bb2f39e6db06a62f9d353e4601a332a1.tar.xz
kernel-qcow2-linux-bc2ae0f5bb2f39e6db06a62f9d353e4601a332a1.zip
workqueue: drop @bind from create_worker()
Currently, create_worker()'s callers are responsible for deciding whether the newly created worker should be bound to the associated CPU and create_worker() sets WORKER_UNBOUND only for the workers for the unbound global_cwq. Creation during normal operation is always via maybe_create_worker() and @bind is true. For workers created during hotplug, @bind is false. Normal operation path is planned to be used even while the CPU is going through hotplug operations or offline and this static decision won't work. Drop @bind from create_worker() and decide whether to bind by looking at GCWQ_DISASSOCIATED. create_worker() will also set WORKER_UNBOUND autmatically if disassociated. To avoid flipping GCWQ_DISASSOCIATED while create_worker() is in progress, the flag is now allowed to be changed only while holding all manager_mutexes on the global_cwq. This requires that GCWQ_DISASSOCIATED is not cleared behind trustee's back. CPU_ONLINE no longer clears DISASSOCIATED before flushing trustee, which clears DISASSOCIATED before rebinding remaining workers if asked to release. For cases where trustee isn't around, CPU_ONLINE clears DISASSOCIATED after flushing trustee. Also, now, first_idle has UNBOUND set on creation which is explicitly cleared by CPU_ONLINE while binding it. These convolutions will soon be removed by further simplification of CPU hotplug path. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Diffstat (limited to 'kernel/nsproxy.c')
0 files changed, 0 insertions, 0 deletions