From: john stultz <johnstul@us.ibm.com>
To: Dominik Brodowski <linux@brodo.de>
Cc: Andrew Morton <akpm@osdl.org>,
"Ronny V. Vindenes" <s864@ii.uib.no>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: Terrible interactivity with 2.6.0-t9-mm3
Date: 18 Nov 2003 11:18:23 -0800 [thread overview]
Message-ID: <1069183103.11432.2108.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <20031118185641.GA6001@brodo.de>
On Tue, 2003-11-18 at 10:56, Dominik Brodowski wrote:
> On Mon, Nov 17, 2003 at 11:36:50AM -0800, Andrew Morton wrote:
> >
> > Probably the interactivity problems are due to the CPU scheduler thinking
> > that the CPU runs at 0Hz.
>
> Is this in "plain" test9 as well? can't find any reference to either
> bogomips or to cpu_khz in any scheduler-related code in
> 2.6.0-test9-bk-as-of-yesterday.
Well, in smp_tune_scheduling() we initialize some scheduler tunables
based on cpu_khz, but in those cases we have safe fallbacks. cpu_khz not
being initialized is a somewhat minor issue.
The big issue is sched_clock() was written to only support the TSC (and
to fall back to jiffies if cpu_has_tsc was false or we were using a
CONFIG_NUMA compiled kernel).
The problem is however that it uses functions from the TSC timesource to
convert cycles to nsecs. Those functions do not work unless the TSC is
being used as a timesource. That is why the ACPI PM and PIT were having
problems (likely cyclone as well).
Thomas' patch to only use the TSC if the TSC timesource is being used
fixes the issue. I'm playing with a patch that may help systems using
other time sources, but needs more testing.
> > If we can work out why the PM timer patch has
> > broken the CPU clock speed detection then all should be well.
>
> cpu_khz is done during init_tsc. The code is basically:
>
> unsigned long eax=0, edx=1000, tsc_quotient;
> tsc_quotient = calibrate_tsc();
> if (tsc_quotient) {
> __asm__("divl %2"
> :"=a" (cpu_khz), "=d" (edx)
> :"r" (tsc_quotient),
> "0" (eax), "1" (edx));
> }
>
> cpu_khz is only available (so far) if the TSC or HPET time sources are used,
> and not when the PIT time source is used. So the scheduler tweak should have
> some sort of fall-back mechanism anyway, IMHO.
The Cyclone timesource also initializes cpu_khz, and I sent out a patch
that made it share the initialization code w/ the ACPI PM time source.
See:
http://www.ussg.iu.edu/hypermail/linux/kernel/0311.2/0250.html
But you're correct, there are proper fallbacks for the PIT case where
cpu_khz isn't calibrated.
> As for the bogomips question: I see different bogomips values for
> tsc (~1.200)
> pit (~600)
> and pmtmr (~8)
> on my 600 MHz PIII Coppermine.
BogoMIPS is just based on loops_per_jiffy, which is calculated in
calibrate_delay(). Its name is deceiving and the output is just
cosmetic. Probably should be changed, but its historical, so I'm
hesitant.
However, the both the pit and pmtmr should be using a very similar loop
delay function which should result in the same BogoMIPS value. I'll look
into it.
thanks
-john
next prev parent reply other threads:[~2003-11-18 19:23 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-17 12:11 Ronny V. Vindenes
2003-11-17 13:12 ` Prakash K. Cheemplavam
2003-11-17 19:46 ` Thomas Schlichter
2003-11-17 21:27 ` john stultz
2003-11-17 22:44 ` john stultz
2003-11-17 22:51 ` Prakash K. Cheemplavam
2003-11-17 22:55 ` john stultz
2003-11-17 23:04 ` john stultz
2003-11-17 23:46 ` Thomas Schlichter
2003-11-18 22:59 ` linux-2.6.0-test9-mm3_acpi-pm-monotonic-fix_A0 john stultz
2003-11-19 7:34 ` linux-2.6.0-test9-mm3_acpi-pm-monotonic-fix_A0 Thomas Schlichter
2003-11-18 13:24 ` Terrible interactivity with 2.6.0-t9-mm3 Prakash K. Cheemplavam
2003-11-18 16:11 ` Prakash K. Cheemplavam
2003-11-18 18:28 ` john stultz
2003-11-18 16:15 ` Prakash K. Cheemplavam
2003-11-17 13:15 ` Felipe Alfaro Solana
2003-11-17 19:36 ` Andrew Morton
2003-11-17 19:35 ` john stultz
2003-11-18 18:56 ` Dominik Brodowski
2003-11-18 19:18 ` john stultz [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-11-16 19:26 CaT
2003-11-16 20:24 ` Prakash K. Cheemplavam
2003-11-16 21:42 ` Andrew Morton
2003-11-16 22:06 ` Arnaldo Carvalho de Melo
2003-11-16 22:13 ` Andrew Morton
2003-11-16 22:18 ` CaT
2003-11-17 0:16 ` Panagiotis Papadakos
2003-11-17 2:20 ` Gawain Lynch
2003-11-17 2:49 ` Andrew Morton
2003-11-17 3:11 ` Gawain Lynch
2003-11-17 3:54 ` Gene Heskett
2003-11-17 4:19 ` Nick Piggin
2003-11-17 4:47 ` Gene Heskett
2003-11-17 5:17 ` Nick Piggin
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=1069183103.11432.2108.camel@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@brodo.de \
--cc=s864@ii.uib.no \
/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
Powered by JetHome