[lkml]   [2001]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Patch] Re: Nasty suprise with uptime
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
More majordomo info at
Please read the FAQ at

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