summaryrefslogtreecommitdiff
path: root/kernel/workqueue_internal.h
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2014-05-20 17:46:33 +0800
committerTejun Heo <tj@kernel.org>2014-05-20 10:59:32 -0400
commit4d757c5c81edba2052aae10d5b36dfcb9902b141 (patch)
treecf6462421d19834ab6bdd17d18c7916a5adb8fb4 /kernel/workqueue_internal.h
parent7cda9aae0596d871a8d7a6888d7b447c60e5ab30 (diff)
workqueue: narrow the protection range of manager_mutex
In create_worker(), as pool->worker_ida now uses ida_simple_get()/ida_simple_put() and doesn't require external synchronization, it doesn't need manager_mutex. struct worker allocation and kthread allocation are not visible by any one before attached, so they don't need manager_mutex either. The above operations are before the attaching operation which attaches the worker to the pool. Between attaching and starting the worker, the worker is already attached to the pool, so the cpu hotplug will handle cpu-binding for the worker correctly and we don't need the manager_mutex after attaching. The conclusion is that only the attaching operation needs manager_mutex, so we narrow the protection section of manager_mutex in create_worker(). Some comments about manager_mutex are removed, because we will rename it to attach_mutex and add worker_attach_to_pool() later which will be self-explanatory. tj: Minor description updates. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue_internal.h')
0 files changed, 0 insertions, 0 deletions