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]
Message-ID: <20111209165702.GD12108@google.com>
Date:	Fri, 9 Dec 2011 08:57:02 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: workqueue_set_max_active(wq, 0)?

Hello, Johannes. :)

On Fri, Dec 09, 2011 at 10:54:42AM +0100, Johannes Berg wrote:
> And then I found workqueue_set_max_active() but passing 0 isn't allowed.
> 
> Before I dive in more deeply I figured I'd ask if you think what a good
> way of doing this would be (and whether I'm completely insane) :-)

Hmmm... yeah, actually, that's what wq uses internally to implement
freezable workqueues.  It sets max_active to 0 temporarily and waits
for all in-flight works to finish.  On thaw, the original value is
restored.

Updating workqueue_set_max_active() to return the old value would be a
nice API update which goes together, I think.

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