lkml.org 
[lkml]   [2011]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 04/21] sched: Change the ttwu success details
    From
    Date
    On Wed, 2011-04-13 at 12:48 +0200, Peter Zijlstra wrote:
    > On Wed, 2011-04-13 at 11:23 +0200, Peter Zijlstra wrote:
    > > and workqueue wakeups, and I doubt extra wakeups will cause lockups.
    >
    > Damn assumptions ;-)
    >
    > Index: linux-2.6/kernel/sched.c
    > ===================================================================
    > --- linux-2.6.orig/kernel/sched.c
    > +++ linux-2.6/kernel/sched.c
    > @@ -2447,7 +2447,7 @@ static inline void ttwu_post_activation(
    > }
    > #endif
    > /* if a worker is waking up, notify workqueue */
    > - if ((p->flags & PF_WQ_WORKER) && success)
    > + if (p->flags & PF_WQ_WORKER)
    > wq_worker_waking_up(p, cpu_of(rq));
    > }
    >
    >
    > Appears to be sufficient to cause the lockup, so somehow the whole
    > workqueue stuff relies on the fact that waking a TASK_(UN)INTERRUPTIBLE
    > task that hasn't been dequeued yet isn't a wakeup.
    >
    > Tejun any quick clues as to why and how to cure this?
    >
    > /me goes read that stuff

    OK, so wq_worker_waking_up() does an atomic_inc() that wants to be
    balanced against the atomic_dec() in wq_worker_sleeping(), which is only
    called when we dequeue things.




    \
     
     \ /
      Last update: 2011-04-13 13:07    [W:0.029 / U:264.924 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site