Skip to contentSkip to conversation

recover losed timer interrupt using the TSC [Re: [patch] kstat change to see how much Linux SMP really scale well]

PATCH Andrea Arcangeli 1 participant 1 message Mar 17, 1999 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 12 lines · Ulrich Windl

[...]

Review

Quoted 7 lines
(quoted diff) +7 -0
+	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.

Quoted 6 lines

Review

Quoted 2 lines
(quoted diff) +1 -1
-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 [email protected]
Please read the FAQ at http://www.tux.org/lkml/