diff options
author | Tejun Heo <tj@kernel.org> | 2012-07-17 12:39:27 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-07-17 12:39:27 -0700 |
commit | 6037315269d62bf967286ae2670fdd6b6acedab9 (patch) | |
tree | c476298b57c0a33aa7fe3c898d62ce17eb11d2ad /Documentation | |
parent | 403c821d452c03be4ced571ac91339a9d3631b17 (diff) | |
download | op-kernel-dev-6037315269d62bf967286ae2670fdd6b6acedab9.zip op-kernel-dev-6037315269d62bf967286ae2670fdd6b6acedab9.tar.gz |
workqueue: use mutex for global_cwq manager exclusion
POOL_MANAGING_WORKERS is used to ensure that at most one worker takes
the manager role at any given time on a given global_cwq. Trustee
later hitched on it to assume manager adding blocking wait for the
bit. As trustee already needed a custom wait mechanism, waiting for
MANAGING_WORKERS was rolled into the same mechanism.
Trustee is scheduled to be removed. This patch separates out
MANAGING_WORKERS wait into per-pool mutex. Workers use
mutex_trylock() to test for manager role and trustee uses mutex_lock()
to claim manager roles.
gcwq_claim/release_management() helpers are added to grab and release
manager roles of all pools on a global_cwq. gcwq_claim_management()
always grabs pool manager mutexes in ascending pool index order and
uses pool index as lockdep subclass.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions