lkml.org 
[lkml]   [2011]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] time: Add locking to xtime access in get_seconds()
    From
    Date
    On Wed, 2011-05-04 at 09:51 -0700, Max Asbock wrote:
    > On Tue, 2011-05-03 at 20:11 -0700, John Stultz wrote:
    > > From: John Stultz <johnstul@us.ibm.com>
    > >
    > > So get_seconds() has always been lock free, with the assumption
    > > that accessing a long will be atomic.
    > >
    >
    > get_seconds() is used in the x86 machine check handler and there is a
    > comment saying:
    > /* We hope get_seconds stays lockless */
    >
    > This needs to be carefully looked at if locking is introduced to
    > get_seconds().

    Ah. Thanks for pointing this out Max.

    I'll go ahead and use Andi's suggestion of the rmb();

    Patch soon to follow.

    thanks
    -john




    \
     
     \ /
      Last update: 2011-05-05 01:09    [W:0.020 / U:29.440 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site