Re: nosmp/maxcpus=0 or 1 -> TSC unstable
From: Andi Kleen
Date: Tue Jan 15 2008 - 23:13:53 EST
Pete Wyckoff <pw@xxxxxxx> writes:
> We've seen the same problem. We use gettimeofday() for timing of
> network-ish operations on the order of 10-50 us. But not having
> the TSC makes gettimeofday() itself very slow, on the order of 30 us.
>
> Here's what we've been using for quite a few kernel versions. I've
> not tried to submit it for fear that it could break some other
> scenario, as you suggest. Although in hotplug scenarios, this
> function unsynchronized_tsc() should get rerun and disable TSC if
> more processors arrive.
>
> At least count this as a "me too".
The patch is wrong of course because when this is checked not
all CPUs are booted yet. So it will always use TSC even when
multiple CPUs are going to be booted.
The right fix for Dean's problem would be probably to add a new
parameter that disables CPU hotplug and forces smp_possible_map
to max_cpus, which could then be set with maxcpus=1 (or similar)
I would not recommend to use nosmp or maxcpus=0 either because it will
disable the APIC and that is typically a bad thing (especially if you
need network performance)
-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/