lkml.org 
[lkml]   [2009]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/9] perf_counter: fix update_userpage()
Peter Zijlstra writes:

> The below might work:
>
> u32 seq;
> s64 count;
>
> again:
> seq = pc->lock;
>
> if (unlikely(seq & 1)) {

I don't believe we can ever see this condition, since pc->lock is
updated in the kernel either at interrupt level on the cpu this task
is running on, or in the kernel in the context of this task. So this
userspace code can never run in the middle of the kernel updating
things.

Paul.


\
 
 \ /
  Last update: 2009-04-02 11:25    [W:0.114 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site