lkml.org 
[lkml]   [2001]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [Patch] Re: Nasty suprise with uptime
    Date
    From
    Another way is to have jiffies still be a normal 32-bit counter, and have
    another 32 bit value (high_jiffy) whose low bit is supposed to be equal to
    the hight bit of the jiffy value. Set up a timer to repeatedly but rarely
    check the high bit of jiffy and if it's different from the low bit of
    high_jiffy, increase high_jiffy by one. In the rare cases you need to read
    the full 64-bit (or rather, 63-bit) value, do the same test and combine the
    two parts dropping one bit in the middle. (high_jiffy access would be locked)

    This makes 63-bit read slow, but lets normal jiffy ops proceed at
    normal speed. in fact, this method can be used to make any 32-bit counter
    into a big counter without real speed loss if full length reads are rare
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:12    [W:3.617 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site