lkml.org 
[lkml]   [2015]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/3] context_tracking,x86: remove extraneous irq disable & enable from context tracking on syscall entry


    On 02/05/2015 07:27, Ingo Molnar wrote:
    >
    > - synchronize_rcu() avoids having to send an IPI by taking a
    > peak at rq->curr's pt_regs::flag, and if:
    >
    > - the flag is 0 then it has observed a quiescent state.
    >
    > - the flag is 1, then it would set TIF_NOHZ and wait for a
    > completion from a TIF_NOHZ callback.

    Isn't this racy?

    synchronize_rcu CPU nohz CPU
    ---------------------------------------------------------
    set flag = 0
    read flag = 0
    return to userspace
    set TIF_NOHZ

    and there's no guarantee that TIF_NOHZ is ever processed by the nohz CPU.

    Paolo


    \
     
     \ /
      Last update: 2015-05-04 11:41    [W:4.131 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site