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:	Fri, 20 Jul 2012 10:43:21 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	tglx@...utronix.de, linux-pm@...r.kernel.org
Subject: Re: [PATCHSET] workqueue: reimplement CPU hotplug to keep idle
 workers

Hey,

On Fri, Jul 20, 2012 at 07:19:27PM +0200, Peter Zijlstra wrote:
> > Hmmm?  Not really.  We need to keep count of the ones which reqested
> > fixed binding - ie. the ones which explicitly used queue_work_on() -
> > and then flush on wq CPU_DOWN.  Then, we need to audit the current
> > users which are using queue_work{_on}() + explicit FLUSH on CPU_DOWN
> > and convert them.
> 
> No, that's the wrong way about. Just add another WQ_flag, so you can
> tell which work-queues want sane semantics and those mucking about for
> laughs, say WQ_NON_AFFINE.
> 
> Then those with sane semantics (!WQ_NON_AFFINE) get an explicit flush on
> DOWN and don't need to muck about with detaching and re-attaching etc..

Two things - 1. I'd prefer the CPU-affinity requirement to be explicit
at the callsite.  2. To implement it the way you describe, we would
have to implement per-cpu workqueue flush, which is possible but I
don't wanna complicate flush_workqueue() implementation anymore than
it already is.  It's a still a relatively cold exception path.  No
need to complicate the usual path with it.

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