[lkml]   [2001]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Patch] Re: Nasty suprise with uptime
On Thu, Nov 01, 2001 at 10:34:53AM -0500, Richard B. Johnson wrote:
> Well not exactly zealots. I test a lot of stuff. In fact, the code
> you propose:
> if(++jiffies==0) jiffies_hi++;
> ... actually works quite well:

Uhm, no, it really doesn't. See how it pairs with other instructions and
what the cost is when it doesn't have to be as bad:

unsigned long a, b;
if (++a == 0) b++;
movl a, %eax
movl %esp, %ebp
incl %eax
testl %eax, %eax
movl %eax, a
je .L3
popl %ebp
.p2align 4,,7
incl b
jmp .L2

which is really gross considering that:

unsigned long long c;


addl $1, c
adcl $0, c+4

which is quite excellent.

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.070 / U:3.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site