mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Andi Kleen <ak@suse.de>
Cc: Parag Warudkar <kernel-stuff@comcast.net>,
	Nishanth Aravamudan <nacc@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Tim Schmielau <tim@physik3.uni-rostock.de>,
	George Anzinger <george@mvista.com>,
	albert@users.sourceforge.net,
	Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>,
	Christoph Lameter <clameter@sgi.com>,
	Dominik Brodowski <linux@dominikbrodowski.de>,
	David Mosberger <davidm@hpl.hp.com>,
	Andrew Morton <akpm@osdl.org>,
	paulus@samba.org, schwidefsky@de.ibm.com,
	keith maanthey <kmannth@us.ibm.com>,
	Chris McDermott <lcm@us.ibm.com>, Max Asbock <masbock@us.ibm.com>,
	mahuja@us.ibm.com, Darren Hart <darren@dvhart.com>,
	"Darrick J. Wong" <djwong@us.ibm.com>,
	Anton Blanchard <anton@samba.org>,
	donf@us.ibm.com, mpm@selenic.com, benh@kernel.crashing.org
Subject: Re: [PATCH 3/4] new timeofday x86-64 arch specific changes (v. B1)
Date: Fri, 03 Jun 2005 11:27:37 -0700	[thread overview]
Message-ID: <1117823257.17804.60.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <20050603163010.GR23831@wotan.suse.de>

On Fri, 2005-06-03 at 18:30 +0200, Andi Kleen wrote:
> On Thu, Jun 02, 2005 at 07:50:33PM -0400, Parag Warudkar wrote:
> > On Thursday 02 June 2005 19:20, john stultz wrote:
> > > Could you see if the slowness you're feeling is correlated to the
> > > acpi_pm timesource?
> > 
> > Speaking of which, the below code from arch/i386/timer_pm.c looks particularly 
> > more taxing to me - 3 times read from ioport in a loop - not sure how many 
> > time that executes. 
> > 
> > static inline u32 read_pmtmr(void)
> > {
> >         u32 v1=0,v2=0,v3=0;
> >         /* It has been reported that because of various broken
> >          * chipsets (ICH4, PIIX4 and PIIX4E) where the ACPI PM time
> >          * source is not latched, so you must read it multiple
> >          * times to insure a safe value is read.
> >          */
> >         do {
> >                 v1 = inl(pmtmr_ioport);
> >                 v2 = inl(pmtmr_ioport);
> >                 v3 = inl(pmtmr_ioport);
> >         } while ((v1 > v2 && v1 < v3) || (v2 > v3 && v2 < v1)
> >                         || (v3 > v1 && v3 < v2));
> > 
> > Shouldn't that loop be limited to the broken chipsets - why would correct 
> > people with correctly working chipsets carry this extra burden? (Or is it 
> > insignificant?)
> 
> It is not insignificant and makes a lot of difference. On the x86-64
> version of pmtimer I dropped it completely and so far nobody 
> complained.

Alright, I'll add a single read function and keep the triple read
function around just in case. Maybe we can use some sort of dmi
blacklist to auto-detect known trouble cases.

> However I wonder why this new time system is using pmtimer by default
> at all. That is very broken because pmtimer is one of the slowest.
> I would suggest to duplicate the time source selection I have
> in the latest x86-64 (-rc5) time.c, that is optimal for all machines
> I know about (except that you might need to add cyclone and a non TSC
> fallback for i386)

The priority values may need some tweaking. The acpi-pm timesource is
really useful on laptops that have cpufreq issues, so it has been a
higher priority then the TSC in i386 for awhile. 

How about something like this?

300 TSC 
200 HPET
200 CYCLONE
100 ACPI
050 PIT
010 JIFFIES

Then if the system has TSC issues (unsynced, cpufreq problems, etc), we
can demote the TSC's priority to 50 and it will fall back nicely without
manual intervention.

thanks
-john



  reply	other threads:[~2005-06-03 18:27 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-02 18:27 Parag Warudkar
2005-06-02 18:39 ` Nishanth Aravamudan
2005-06-02 23:05   ` Parag Warudkar
2005-06-02 23:20     ` john stultz
2005-06-02 23:33       ` Parag Warudkar
2005-06-02 23:50       ` Parag Warudkar
2005-06-03  7:05         ` Ulrich Windl
2005-06-03 15:24         ` john stultz
2005-06-05 17:05           ` Dominik Brodowski
2005-06-06  3:04             ` Parag Warudkar
2005-06-06  3:14               ` Dominik Brodowski
2005-06-10  0:48               ` George Anzinger
2005-06-06  9:21             ` Andi Kleen
2005-06-06  9:24               ` Dominik Brodowski
2005-06-06  9:30                 ` Andi Kleen
2005-06-06 13:32               ` Vojtech Pavlik
2005-06-06 22:53             ` john stultz
2005-06-03 16:30         ` Andi Kleen
2005-06-03 18:27           ` john stultz [this message]
2005-06-03 19:02             ` Christoph Lameter
2005-06-03 19:21               ` john stultz
2005-06-05 11:27             ` Andi Kleen
2005-06-06 22:51               ` john stultz
2005-06-04 18:40           ` Parag Warudkar
2005-06-05 11:28             ` Andi Kleen
2005-06-05 14:15               ` Parag Warudkar
2005-06-05 20:51                 ` Lee Revell
2005-06-05 21:41                   ` Parag Warudkar
2005-06-05 22:13                     ` Lee Revell
2005-06-06  9:29                 ` Andi Kleen
2005-06-06 11:46                   ` Parag Warudkar
2005-06-08 13:51                     ` Andi Kleen
2005-06-09  1:47                       ` Lee Revell
2005-06-09  2:12                         ` john stultz
2005-06-09  2:42                           ` Parag Warudkar
2005-06-09 14:17                           ` Andi Kleen
2005-06-03 13:32       ` Parag Warudkar
2005-06-02 18:40 ` john stultz
  -- strict thread matches above, loose matches on Subject: below --
2005-06-02 18:51 Parag Warudkar
2005-06-01 23:09 [PATCH 1/4] new timeofday core subsystem " john stultz
2005-06-01 23:12 ` [PATCH 2/4] new timeofday i386 arch specific changes " john stultz
2005-06-01 23:13   ` [PATCH 3/4] new timeofday x86-64 " john stultz
2005-06-02  0:37     ` Parag Warudkar
2005-06-02 17:34       ` john stultz

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=1117823257.17804.60.camel@cog.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=albert@users.sourceforge.net \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=clameter@sgi.com \
    --cc=darren@dvhart.com \
    --cc=davidm@hpl.hp.com \
    --cc=djwong@us.ibm.com \
    --cc=donf@us.ibm.com \
    --cc=george@mvista.com \
    --cc=kernel-stuff@comcast.net \
    --cc=kmannth@us.ibm.com \
    --cc=lcm@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.de \
    --cc=mahuja@us.ibm.com \
    --cc=masbock@us.ibm.com \
    --cc=mpm@selenic.com \
    --cc=nacc@us.ibm.com \
    --cc=paulus@samba.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=tim@physik3.uni-rostock.de \
    --cc=ulrich.windl@rz.uni-regensburg.de \
    /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®