lost timer check in 2.6.7

From: Andi Kleen
Date: Wed Jun 16 2004 - 06:26:00 EST



2.6.7 has

+ /* ... but give the TSC a fair chance */
+ if (lost_count > 25)
+ cpufreq_delayed_get();

While looking at porting this code to x86-64 I noticed that this only runs for
the first lost timer event. In case of dynamic frequency which varies shouldn't this
be more like

if ((lost_count % 25) == 0)
cpufreq_delayed_get();

? Otherwise this heuristic will only work once.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/