Re: [Lse-tech] Re: [RFC][PATCH] 2.6.0-test11 sched_clock() broken for "drifty ITC"

From: Martin J. Bligh
Date: Mon Dec 29 2003 - 14:33:58 EST


>> Could you please finalise it, cook up the ia64 and numaq implementations
>> and send it over?
>
> I believe the "ia64 implementation" stands as-is, since it uses the low-
> overhead ITC.
>
> I'm not familiar with NUMAQ issues, but perhaps this timer_tsc.c change
> would be appropriate? It allows i386 CONFIG_NUMA platforms to potentially
> use the TSC for sched_clock() timings, given that sched_clock() no longer
> requires that the TSC be synchronized across all CPUs. It does, however,
> require that "use_tsc" be properly initialized for i386 CONFIG_NUMA. Is
> that a valid assumption?

I don't think there's anything special about use_tsc for NUMA-Q - it's
set to 1 AFAICS. I had a patch to force notsc on about 6 months or so
ago, but it made the machine crash hard in strange ways I never bothered
debugging.

Is there any harm in dropping the first part of your patch, ie.

> diff -X /home/hawkes/Patches/ignore.dirs -Naur linux-2.6.0/arch/i386/kernel/timers/timer_tsc.c linux-2.6.0-schedclock2/arch/i386/kernel/timers/timer_tsc.c
> --- linux-2.6.0/arch/i386/kernel/timers/timer_tsc.c Mon Nov 24 12:18:20 2003
> +++ linux-2.6.0-schedclock2/arch/i386/kernel/timers/timer_tsc.c Sat Dec 13 11:33:04 2003
> @@ -138,9 +138,7 @@
> * In the NUMA case we dont use the TSC as they are not
> * synchronized across all CPUs.
> */
> -#ifndef CONFIG_NUMA
> if (!use_tsc)
> -#endif
> return (unsigned long long)jiffies * (1000000000 / HZ);
>
> /* Read the Time Stamp Counter */

and leaving the rest of it? the CONFIG_NUMA affects both NUMA-Q and Summit,
BTW, which uses the cyclone timer, so it gets even more complex ;-)

M.
-
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/