Lai Jiangshan <la...@cn.fujitsu.com> writes: > From: Frederic Weisbecker <fweis...@gmail.com> > > Create a cpumask that limit the affinity of all unbound workqueues. > This cpumask is controlled though a file at the root of the workqueue > sysfs directory. > > It works on a lower-level than the per WQ_SYSFS workqueues cpumask files > such that the effective cpumask applied for a given unbound workqueue is > the intersection of /sys/devices/virtual/workqueue/$WORKQUEUE/cpumask and > the new /sys/devices/virtual/workqueue/cpumask_unbounds file. > > This patch implements the basic infrastructure and the read interface. > cpumask_unbounds is initially set to cpu_possible_mask. > > Cc: Christoph Lameter <c...@linux.com> > Cc: Kevin Hilman <khil...@linaro.org> > Cc: Lai Jiangshan <la...@cn.fujitsu.com> > Cc: Mike Galbraith <bitbuc...@online.de> > Cc: Paul E. McKenney <paul...@linux.vnet.ibm.com> > Cc: Tejun Heo <t...@kernel.org> > Cc: Viresh Kumar <viresh.ku...@linaro.org> > Signed-off-by: Frederic Weisbecker <fweis...@gmail.com> > Signed-off-by: Lai Jiangshan <la...@cn.fujitsu.com>
[...] > @@ -5094,6 +5116,9 @@ static int __init init_workqueues(void) > > WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long)); > > + BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL)); > + cpumask_copy(wq_unbound_cpumask, cpu_possible_mask); > + As I mentioned in an earlier discussion[1], I still think this could default too the housekeeping CPUs in the NO_HZ_FULL case: #ifdef CONFIG_NO_HZ_FULL cpumask_complement(wq_unbound_cpumask, tick_nohz_full_mask); #else cpumask_copy(wq_unbound_cpumask, cpu_possible_mask); #endif But that could also be left to a future optimization as well. Kevin [1] https://lkml.org/lkml/2014/2/14/666 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/