lkml.org 
[lkml]   [2011]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 09/11] job control: reorganize wait_task_stopped()
    Hello,

    On Thu, May 12, 2011 at 08:33:26PM +0200, Oleg Nesterov wrote:
    > Damn, you are right, I think.

    Yay, for once!

    > At first glance, do_wait() does
    >
    > wait_task_stopped();
    > wait_task_continued();
    >
    > and the state can be changed CONTINIUED -> STOPPED in between, right?
    > Or something else?

    Yeah and exit transitions too. There simply is no synchronization
    there. We can probably solve it without acquiring siglock by adding
    "clear this before making state transitions" flag followed by a mb()
    and then making children clear it before transitions. Then, we can
    retry WNOHANG wait if the flag is cleared after checking.

    Thanks.

    --
    tejun


    \
     
     \ /
      Last update: 2011-05-13 10:49    [W:4.086 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site