From: Thomas Schlichter <schlicht@uni-mannheim.de>
To: "Prakash K. Cheemplavam" <prakashpublic@gmx.de>,
"Ronny V. Vindenes" <s864@ii.uib.no>,
Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, cat@zip.com.au,
gawain@freda.homelinux.org, gene.heskett@verizon.net,
papadako@csd.uoc.gr
Subject: Re: Terrible interactivity with 2.6.0-t9-mm3
Date: Mon, 17 Nov 2003 20:46:13 +0100 [thread overview]
Message-ID: <200311172046.17736.schlicht@uni-mannheim.de> (raw)
In-Reply-To: <3FB8C92E.7030201@gmx.de>
[-- Attachment #1.1: Type: text/plain, Size: 2254 bytes --]
Hi!
On Monday 17 November 2003 14:12, Prakash K. Cheemplavam wrote:
> Ronny V. Vindenes wrote:
> > I've found that neither linus.patch nor
> > context-switch-accounting-fix.patch is causing the problem, but rather
> > acpi-pm-timer-fixes.patch & acpi-pm-timer.patch
> >
> > With these applied my cpu (athlon64) is detected as 0.0Mhz, bogomips
> > drops to 50% and anything cpu intensive destroys interactivity. Revert
> > them and performance is back at -mm2 level.
>
> Yup, works for me too. Reverting those patches and my machine is smooth
> again. :)
>
> Prakash
I was able to reproduce the interactivity problem, too. My simple testcase
was:
1. open a KDE Konsole
2. execute "while true; do a=2; done" in the Konsole
3. Move the Konsole window.
With test9-mm3 booted with "clock=pit" or "clock=pmtmr" moving the window was
very sluggish... Booted with "clock=tsc" made it work fine again. (Btw. which
kind of hardware is needed to make "clock=hpet" work?)
The problem is that sched_clock() uses the TSC if the hardware supports it.
But the needed scaling factors are only initialized in init_tsc() and
init_hpet(). So there are 2 possibilities to fix this:
1. Call the neccessary parts of init_tsc() in init_pmtmr() and init_pit().
2. Use the TSC in sched_clock() only if "clock=tsc" was set.
I've attached a small patch that does the 2nd thing. For me it fixed the
interactivity problem...
The 2nd attached patch adds the .name field to the timer_pmtmr struct. This
makes the kernel to show "Using pmtmr for high-res timesource" instead of
"Using NULL for high-res timesource" when booting...
Andrew, please consider applying the patches...
Btw. the BogoMIPS value is the argument for the __delay() function needed to
wait 1 jiffy. The difference is that the TSC version of this function uses
the clock cycle count as its argument whereas the PMTMR and PIT versions take
the count of loops to wait as their argument. Well, and it seems that each
loop iteration needs 2 clock cycles.
The problem with the shown CPU frequency is, that cpu_khz is only set in
init_tsc() and init_hpet(). But I don't know how this can be fixed without
using the TSC...
Best regards
Thomas
[-- Attachment #1.2: fix-sched_clock.diff --]
[-- Type: text/x-diff, Size: 703 bytes --]
--- linux-2.6.0-test9-mm3/arch/i386/kernel/timers/timer_tsc.c Sat Nov 15 18:09:24 2003
+++ linux-2.6.0-test9-mm3_patched/arch/i386/kernel/timers/timer_tsc.c Mon Nov 17 19:27:36 2003
@@ -32,7 +32,7 @@ int tsc_disable __initdata = 0;
extern spinlock_t i8253_lock;
extern volatile unsigned long jiffies;
-static int use_tsc;
+static int use_tsc = 0;
/* Number of usecs that the last interrupt was delayed */
static int delay_at_last_interrupt;
@@ -139,7 +139,7 @@ unsigned long long sched_clock(void)
* synchronized across all CPUs.
*/
#ifndef CONFIG_NUMA
- if (unlikely(!cpu_has_tsc))
+ if (!use_tsc)
#endif
return (unsigned long long)jiffies * (1000000000 / HZ);
[-- Attachment #1.3: pmtmr-name-diff --]
[-- Type: text/x-diff, Size: 436 bytes --]
--- linux-2.6.0-test9-mm3/arch/i386/kernel/timers/timer_pm.c Sat Nov 15 18:09:24 2003
+++ linux-2.6.0-test9-mm3_patched/arch/i386/kernel/timers/timer_pm.c Mon Nov 17 19:29:30 2003
@@ -185,6 +185,7 @@ static unsigned long get_offset_pmtmr(vo
/* acpi timer_opts struct */
struct timer_opts timer_pmtmr = {
+ .name = "pmtmr",
.init = init_pmtmr,
.mark_offset = mark_offset_pmtmr,
.get_offset = get_offset_pmtmr,
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-11-17 19:46 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 [this message]
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
-- 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=200311172046.17736.schlicht@uni-mannheim.de \
--to=schlicht@uni-mannheim.de \
--cc=akpm@osdl.org \
--cc=cat@zip.com.au \
--cc=gawain@freda.homelinux.org \
--cc=gene.heskett@verizon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=papadako@csd.uoc.gr \
--cc=prakashpublic@gmx.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