From: Andi Kleen <andi@firstfloor.org>
To: Pete Wyckoff <pw@osc.edu>
Cc: dean gaudet <dean@arctic.org>, linux-kernel@vger.kernel.org
Subject: Re: nosmp/maxcpus=0 or 1 -> TSC unstable
Date: Wed, 16 Jan 2008 05:13:41 +0100 [thread overview]
Message-ID: <p73prw2l85m.fsf@bingen.suse.de> (raw)
In-Reply-To: <20080115225039.GA25701@osc.edu> (Pete Wyckoff's message of "Tue\, 15 Jan 2008 17\:50\:39 -0500")
Pete Wyckoff <pw@osc.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
next prev parent reply other threads:[~2008-01-16 4:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-12 19:48 nosmp/maxcpus=0 or 1 -> TSC unstable dean gaudet
2008-01-15 22:50 ` Pete Wyckoff
2008-01-16 4:13 ` Andi Kleen [this message]
2008-01-16 15:31 ` Ingo Molnar
2008-01-16 16:24 ` Pete Wyckoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p73prw2l85m.fsf@bingen.suse.de \
--to=andi@firstfloor.org \
--cc=dean@arctic.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pw@osc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox