[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1323449963.3622.20.camel@jlt3.sipsolutions.net>
Date: Fri, 09 Dec 2011 17:59:23 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Tejun Heo <tj@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: workqueue_set_max_active(wq, 0)?
Hi Tejun,
> > 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.
Right, it's a little more complicated though because it has to wait etc.
> Updating workqueue_set_max_active() to return the old value would be a
> nice API update which goes together, I think.
Yeah, that would probably be useful, in particular if one tries to
freeze a paused workqueue...
johannes
--
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