lkml.org 
[lkml]   [2011]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Q: perf_install_in_context/perf_event_enable are racy?
    From
    Date
    On Thu, 2011-01-27 at 17:57 +0100, Oleg Nesterov wrote:
    >
    > > With, however, things are more interesting. 2 seems to be adequately
    > > covered by the patch I just send, the IPI will bail and the next
    > > sched-in of the relevant task will pick matters up. 1 otoh doesn't seem
    > > covered, the IPI will bail, leaving us stranded.
    >
    > Hmm, yes... Strangely, I missed that when I was thinking about in_ctxsw.
    >
    > Perhaps, we can change task_oncpu_function_call() so that it returns
    > -EAGAIN in case it hits in_ctxsw != 0? If the caller sees -EAGAIN, it
    > should always retry even if !ctx->is_active.

    That would be very easy to do, we can pass a return value through the
    task_function_call structure.


    \
     
     \ /
      Last update: 2011-01-27 18:13    [W:4.091 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site