lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 16 Mar 2015 18:25:27 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Kevin Hilman <khilman@...nel.org>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>, linux-kernel@...r.kernel.org,
	Christoph Lameter <cl@...ux.com>,
	Mike Galbraith <bitbucket@...ine.de>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Tejun Heo <tj@...nel.org>,
	Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 3/4] workqueue: Create low-level unbound workqueues
 cpumask

On Mon, Mar 16, 2015 at 10:12:12AM -0700, Kevin Hilman wrote:
> Lai Jiangshan <laijs@...fujitsu.com> writes:
> 
> > On 03/14/2015 07:49 AM, Kevin Hilman wrote:
> >> Lai Jiangshan <laijs@...fujitsu.com> writes:
> >> 
> >>> From: Frederic Weisbecker <fweisbec@...il.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 <cl@...ux.com>
> >>> Cc: Kevin Hilman <khilman@...aro.org>
> >>> Cc: Lai Jiangshan <laijs@...fujitsu.com>
> >>> Cc: Mike Galbraith <bitbucket@...ine.de>
> >>> Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> >>> Cc: Tejun Heo <tj@...nel.org>
> >>> Cc: Viresh Kumar <viresh.kumar@...aro.org>
> >>> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> >>> Signed-off-by: Lai Jiangshan <laijs@...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);
> >
> >
> > No, the default/booted wq_unbound_cpumask should be cpu_possible_mask.
> >
> 
> Even for NO_HZ_FULL?  
> 
> IMO, for NO_HZ_FULL, we want the unbound workqueues to be on the
> housekeeping CPU(s).

If it should be the default on NO_HZ_FULL, maybe we should do this from the
tick nohz code. Some late or fs initcall that will do the workqueue affinity,
timer affinity, etc...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ