Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IA64] ITC: Reduce rating for ITC clock if ITCs are drifty

Make sure to reduce the rating of the ITC clock if ITCs are drifty. If they
are drifting then we have not synchronized the ITC values, nor are we doing
the jitter compensation (useless since drift may increase the differentials
arbitrarily).

Without this patch it is possible that the ITC clock becomes selected as
the system clock on systems with drifty ITCs which will result in
nanosleep hanging.

One can still select the itc clock manually on such systems via

clocksource=itc

(Produces nice hangs on SGI Altix.)

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by

Christoph Lameter and committed by
Tony Luck
b718f91c 40d48575

+15 -1
+15 -1
arch/ia64/kernel/time.c
··· 240 240 if (!nojitter) 241 241 itc_jitter_data.itc_jitter = 1; 242 242 #endif 243 - } 243 + } else 244 + /* 245 + * ITC is drifty and we have not synchronized the ITCs in smpboot.c. 246 + * ITC values may fluctuate significantly between processors. 247 + * Clock should not be used for hrtimers. Mark itc as only 248 + * useful for boot and testing. 249 + * 250 + * Note that jitter compensation is off! There is no point of 251 + * synchronizing ITCs since they may be large differentials 252 + * that change over time. 253 + * 254 + * The only way to fix this would be to repeatedly sync the 255 + * ITCs. Until that time we have to avoid ITC. 256 + */ 257 + clocksource_itc.rating = 50; 244 258 245 259 /* Setup the CPU local timer tick */ 246 260 ia64_cpu_local_tick();