diff options
author | Tejun Heo <tj@kernel.org> | 2013-04-01 11:23:31 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-04-01 11:23:31 -0700 |
commit | 13e2e556013a543eebd238d1c2759195e3c0c9fc (patch) | |
tree | ee1aefceeda27e8ede268ce74bd9faf53efbf95c /Documentation | |
parent | bc0caf099d9df4dd0fad24992b043b40541f4200 (diff) | |
download | op-kernel-dev-13e2e556013a543eebd238d1c2759195e3c0c9fc.zip op-kernel-dev-13e2e556013a543eebd238d1c2759195e3c0c9fc.tar.gz |
workqueue: fix unbound workqueue attrs hashing / comparison
29c91e9912b ("workqueue: implement attribute-based unbound worker_pool
management") implemented attrs based worker_pool matching. It tried
to avoid false negative when comparing cpumasks with custom hash
function; unfortunately, the hash and comparison functions fail to
ignore CPUs which are not possible. It incorrectly assumed that
bitmap_copy() skips leftover bits in the last word of bitmap and
cpumask_equal() ignores impossible CPUs.
This patch updates attrs->cpumask handling such that impossible CPUs
are properly ignored.
* Hash and copy functions no longer do anything special. They expect
their callers to clear impossible CPUs.
* alloc_workqueue_attrs() initializes the cpumask to cpu_possible_mask
instead of setting all bits and explicit cpumask_setall() for
unbound_std_wq_attrs[] in init_workqueues() is dropped.
* apply_workqueue_attrs() is now responsible for ignoring impossible
CPUs. It makes a copy of @attrs and clears impossible CPUs before
doing anything else.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions