aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-04-01 14:23:38 -0400
committerTejun Heo <tj@kernel.org>2013-04-01 14:23:38 -0400
commitd55262c4d164759a8debe772da6c9b16059dec47 (patch)
tree2dffae0287567802a05e3290048195ea277d22ae /include
parent4c16bd327c74d6678858706211a0c6e4e53eb3e6 (diff)
workqueue: update sysfs interface to reflect NUMA awareness and a kernel param to disable NUMA affinity
Unbound workqueues are now NUMA aware. Let's add some control knobs and update sysfs interface accordingly. * Add kernel param workqueue.numa_disable which disables NUMA affinity globally. * Replace sysfs file "pool_id" with "pool_ids" which contain node:pool_id pairs. This change is userland-visible but "pool_id" hasn't seen a release yet, so this is okay. * Add a new sysf files "numa" which can toggle NUMA affinity on individual workqueues. This is implemented as attrs->no_numa whichn is special in that it isn't part of a pool's attributes. It only affects how apply_workqueue_attrs() picks which pools to use. After "pool_ids" change, first_pwq() doesn't have any user left. Removed. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/workqueue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 835d12b76960..717975639378 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -119,10 +119,15 @@ struct delayed_work {
119/* 119/*
120 * A struct for workqueue attributes. This can be used to change 120 * A struct for workqueue attributes. This can be used to change
121 * attributes of an unbound workqueue. 121 * attributes of an unbound workqueue.
122 *
123 * Unlike other fields, ->no_numa isn't a property of a worker_pool. It
124 * only modifies how apply_workqueue_attrs() select pools and thus doesn't
125 * participate in pool hash calculations or equality comparisons.
122 */ 126 */
123struct workqueue_attrs { 127struct workqueue_attrs {
124 int nice; /* nice level */ 128 int nice; /* nice level */
125 cpumask_var_t cpumask; /* allowed CPUs */ 129 cpumask_var_t cpumask; /* allowed CPUs */
130 bool no_numa; /* disable NUMA affinity */
126}; 131};
127 132
128static inline struct delayed_work *to_delayed_work(struct work_struct *work) 133static inline struct delayed_work *to_delayed_work(struct work_struct *work)