[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <p73prw2l85m.fsf@bingen.suse.de>
Date: Wed, 16 Jan 2008 05:13:41 +0100
From: Andi Kleen <andi@...stfloor.org>
To: Pete Wyckoff <pw@....edu>
Cc: dean gaudet <dean@...tic.org>, linux-kernel@...r.kernel.org
Subject: Re: nosmp/maxcpus=0 or 1 -> TSC unstable
Pete Wyckoff <pw@....edu> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists