lkml.org 
[lkml]   [2011]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 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


    \
     
     \ /
      Last update: 2011-12-09 17:59    [W:0.021 / U:30.412 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site