[lkml]   [1999]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] recover losed timer interrupt using the TSC [Re: [patch] kstat change to see how much Linux SMP really scale well]
On Tue, 16 Mar 1999, Ulrich Windl wrote:

>> + register unsigned long delta_usec;
>> +
>> + __asm__("mull %2"
>> + :"=a" (delta_cycles), "=d" (delta_usec)
>> + :"g" (fast_gettimeoffset_quotient), "0" (delta_cycles));
>> + delta_usec -= delay_usec;
>> + delta_usec /= 1000000/HZ;
>Your delta_usec is in fact a lost_ticks. The name is confusing when
>you add microseconds to jiffies. (IMHO)

Ok, agreed. It was not a problem right now but removing the `_usec' could
be a better choice. Thanks.

>> -long tick = (1000000 + HZ/2) / HZ; /* timer interrupt period */
>> +long tick = 1000000 / HZ; /* timer interrupt period */
>This way the system time will be more behind than before if
>"(1000000 % HZ) >= HZ/2". IMHO the line is correct. After all we are
>not saying "(1000000 + HZ - 1) / HZ".

;). Agreed. I also needed such trick that to make the recover of the lost
ticks completly relialable. I just removed such changes from my second
patch. But thanks for commenting about that. I wanted to hear if I was
missing something of more serious or it was only an attempt to decrease
the error in integer divisions.

Andrea Arcangeli

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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