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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140330130139.GD8942@htj.dyndns.org>
Date:	Sun, 30 Mar 2014 09:01:39 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Christoph Lameter <cl@...ux.com>,
	Kevin Hilman <khilman@...aro.org>,
	Mike Galbraith <bitbucket@...ine.de>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 3/4] workqueue: Add anon workqueue sysfs hierarchy

On Thu, Mar 27, 2014 at 06:21:01PM +0100, Frederic Weisbecker wrote:
> We call "anon workqueues" the set of unbound workqueues that don't
> carry the WQ_SYSFS flag.
> 
> They are a problem nowadays because people who work on CPU isolation
> (HPC, Real time, etc...) want to be able to migrate all the unbound
> workqueues away to a single housekeeping CPU. This control is possible
> through sysfs but only with WQ_SYSFS workqueues.
> 
> Now we need to deal with the other unbound workqueues. There is two
> possible solutions:
> 
> 1) Implement a sysfs directory for each unbound !WQ_SYSFS. This could
> be done with a specific Kconfig to make sure that these workqueue
> won't be considered as a stable ABI. But we all know that all distros
> will enable this Kconfig symbol and that a warning in the Kconfig help
> text won't protect against anything.
> 
> 2) Implement a single sysfs directory containing only the cpumask file
> to the control the affinity of all the !WQ_SYSFS workqueues.
> 
> This patch implements the second solution but only for non-ordered
> unbound workqueues. Ordered workqueues need a special treatment and
> will be handled in a subsequent patch.

I'm not really sure this is the good approach.  I think I wrote this
way back but wouldn't it make more sense to allow userland to restrict
the cpus which are allowed to all unbound cpus.  As currently
implemented, setting WQ_SYSFS to give userland more control would
escape that workqueue from this global mask as a side effect, which is
a surprising behavior and doesn't make much sense to me.  I think it
would make far more sense to implement a knob which controls which
cpus are available to *all* unbound workqueue including the default
fallback one.  That way it's way more consistent and I'm pretty sure
the code would be fairly simple too.  All it needs to do is
restricting the online cpus that unbound workqueues see.

Thanks.

-- 
tejun
--
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