From: Andrea Arcangeli <andrea@suse.de>
To: john stultz <johnstul@us.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
lkml <linux-kernel@vger.kernel.org>,
Leah Cunningham <leahc@us.ibm.com>,
wilhelm.nuesser@sap.com, paramjit@us.ibm.com, msw@redhat.com
Subject: Re: [PATCH] tsc-disable_B9
Date: Thu, 15 Aug 2002 18:56:17 +0200 [thread overview]
Message-ID: <20020815165617.GE14394@dualathlon.random> (raw)
In-Reply-To: <1028860246.1117.34.camel@cog>
On Thu, Aug 08, 2002 at 07:30:46PM -0700, john stultz wrote:
> On Thu, 2002-08-08 at 06:17, Alan Cox wrote:
> > On Thu, 2002-08-08 at 02:53, john stultz wrote:
> > > already seen on another cpu. This patch allows people compiling w/
> > > 'Multi-node NUMA support' to pass "notsc" or "bad-tsc" as boot
> > > parameters. "notsc" disables rdtsc calls, and forces the kernel to use
> > > the PIT for gettimeofday calucluations (as normally expected w/ i386
> > > compiled kernels). While "bad-tsc" forces the kernel to use the PIT for
> > > gettimeofday, but does not disable TSC access.
> >
> > I've done a version of this for -ac which uses the NUMA autodetect, and
> > also provides the hook so I can disable tsc on split on x86 smp with
> > variable multipliers some time. The only comment I really have is please
>
> Not sure I followed that, do you mean per-cpu TSC management for
> gettimeofday?
>
> > use "badtsc" not "bad-tsc" - to match "notsc"
>
> Sounds good. Changed in my tree.
sorry but I don't see the point of badtsc only in kernel.
If the TSC is bad that will be in particular bad from userspace where
there's no hope to know what CPU you're running on.
If the TSC is bad userspace is the one that must not be allowed to read
the tsc at all, the tsc in userspace could only have a function of a
random number generator.
So I suggest to drop the badtsc and to only have the notsc that disables
the tsc globally for both kernel and userspace. That's what I'm doing in
my tree for the above reasons at least.
> > This is how I did it - barring the code that is -ac specific to automatically flip
> > the mode when NUMA hw is detected
>
> Interesting. See my comments below. Auto-detection has been on my list
> for the last week, so I'm eagerly awaiting a peek at the next ac release
> :)
How do you detect the NUMA hw? That would be a nice addition so the
numa-Q users won't be required to add notsc to the append lilo line.
My current preferred status for this patch is here:
http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19rc5aa1/94_numaq-tsc-4
I'm fine to drop the #ifdefs and to allow notsc to be significant
always if you like, however also requiring a numa compilation like now
should be fine, no? At least unless you can detect the badtsc
dynamically also in kernels with numa disabled, which isn't the case
right now I guess.
But still the "allowing badtsc in userspace" in the last patches looks
obviously wrong to me, the "emulate tsc in inst fault" was better, but
even that sounds not the best, all programs should have a fallback to
use gettimeofday so it's better to get the instruction fault immediatly
rather that running slow because of the flood of exceptions that happens
silenty.
Andrea
next prev parent reply other threads:[~2002-08-16 1:11 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-08 1:53 john stultz
2002-08-08 2:15 ` [PATCH] cyclone-timer_A9 john stultz
2002-08-08 13:18 ` Alan Cox
2002-08-09 2:03 ` john stultz
2002-08-08 13:17 ` [PATCH] tsc-disable_B9 Alan Cox
2002-08-09 2:30 ` john stultz
2002-08-09 9:17 ` Alan Cox
2002-08-09 17:46 ` john stultz
2002-08-09 18:49 ` george anzinger
2002-08-09 20:58 ` john stultz
2002-08-13 1:23 ` James Cleverdon
2002-08-11 20:16 ` Alan Cox
2002-08-15 16:56 ` Andrea Arcangeli [this message]
2002-08-16 11:15 ` Alan Cox
2002-08-16 13:19 ` Mikael Pettersson
2002-08-21 13:12 ` Andrea Arcangeli
2002-08-21 14:10 ` Alan Cox
2002-08-21 14:33 ` Andrea Arcangeli
2002-08-21 15:01 ` Alan Cox
2002-08-21 16:13 ` Andrea Arcangeli
2002-08-21 16:25 ` Alan Cox
2002-08-21 17:17 ` Andrea Arcangeli
2002-08-21 17:34 ` Alan Cox
2002-08-26 16:10 ` Pavel Machek
2002-08-26 18:45 ` Martin J. Bligh
2002-08-26 19:00 ` Pavel Machek
2002-08-26 19:05 ` Alan Cox
2002-08-26 20:19 ` Martin J. Bligh
2002-08-26 19:18 ` Richard B. Johnson
2002-08-26 19:42 ` Pavel Machek
2002-08-26 20:23 ` Alan Cox
2002-08-26 22:49 ` Andrea Arcangeli
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=20020815165617.GE14394@dualathlon.random \
--to=andrea@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=johnstul@us.ibm.com \
--cc=leahc@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=msw@redhat.com \
--cc=paramjit@us.ibm.com \
--cc=wilhelm.nuesser@sap.com \
/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
all inboxes | Powered by JetHome®