mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
To: bert hubert <bert.hubert@netherlabs.nl>,
	linux-kernel@vger.kernel.org, george@mvista.com
Subject: Re: gettimeofday order of magnitude slower with pmtimer, which is default
Date: Mon, 20 Mar 2006 15:50:48 +0100	[thread overview]
Message-ID: <20060320145047.GA12332@rhlx01.fht-esslingen.de> (raw)
In-Reply-To: <20060320122449.GA29718@outpost.ds9a.nl>

Hi,

On Mon, Mar 20, 2006 at 01:24:49PM +0100, bert hubert wrote:
> Yesterday, together with Zwane, I discovered each gettimeofday call costs me
> 4 usec on some boxes and almost nothing on others. We did a fruitless chase
> for vsyscall/sysenter happening but the problem turned out to be
> CONFIG_X86_PM_TIMER.
> 
> This problem has been discussed before
> http://www.ussg.iu.edu/hypermail/linux/kernel/0411.1/2135.html
> 
> Not only is the pm timer slow by design, it also needs to be read multiple
> times to work around a bug in certain hardware.
I've been realizing this, too, when looking at some oprofile logs.
pmtmr reading uses almost 3% CPU time (e.g. P3/700) when idle, and it's
similarly problematic when not idle.

I think it's crazy to do a safe tripled readout (with *very* expensive I/O!)
of the PM timer unconditionally on *all* systems when only a
(albeit not that small) subset of systems is affected by buggy (un-latched)
PM timers.
I want to improve things there; I can see three ways to do it:
a) maintain a blacklist (or probably better a whitelist) of systems that
   are (not) affected
b) detect long-time timer accuracy, then switch to fast readout if timer
   is verified to be accurate (no white/blacklist needed this way)
c) give up on PM timer completely

Any comments on which way and how this could/should be done?

> Would a patch removing the link to EMBEDDED and adding a warning that while
> this timer is of high quality, it is slow, be welcome?
I don't want to comment on the first part, but adding a note to the Kconfig
text would be very useful, I think.

Andreas Mohr

  reply	other threads:[~2006-03-20 14:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-20 12:24 bert hubert
2006-03-20 14:50 ` Andreas Mohr [this message]
2006-03-20 15:24   ` Con Kolivas
2006-03-21  1:26     ` OGAWA Hirofumi
2006-03-21  0:40       ` kernel
2006-03-21  2:59         ` OGAWA Hirofumi
2006-03-21  3:09           ` Con Kolivas
2006-03-21  8:53             ` Andreas Mohr
2006-03-21  9:06               ` Arjan van de Ven
2006-03-21 11:58               ` Con Kolivas
2006-03-21 12:04                 ` Arjan van de Ven
2006-03-21 12:07                   ` Con Kolivas
2006-03-21 19:23       ` john stultz
2006-03-21 21:19         ` OGAWA Hirofumi
2006-03-22  0:21           ` Con Kolivas
2006-03-22 18:49             ` [PATCH] PM-Timer: doesn't use workaround if chipset is not buggy OGAWA Hirofumi
2006-03-22 21:46               ` Andrew Morton
2006-03-23  7:31                 ` OGAWA Hirofumi
2006-03-23  7:49                   ` Andrew Morton
2006-03-23 17:04               ` Andreas Mohr
2006-03-23 18:21                 ` OGAWA Hirofumi
2006-03-30 11:53                   ` Andreas Mohr
2006-03-30 15:37                     ` OGAWA Hirofumi
2006-03-30 16:02                       ` Andreas Mohr
2006-03-25 12:00               ` bert hubert
2006-03-22 19:12           ` gettimeofday order of magnitude slower with pmtimer, which is default Avi Kivity
2006-03-22 19:54             ` OGAWA Hirofumi
2006-03-22 20:05             ` john stultz
2006-03-21 19:34 ` john stultz
2006-03-21  5:33 Albert Cahalan

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=20060320145047.GA12332@rhlx01.fht-esslingen.de \
    --to=andi@rhlx01.fht-esslingen.de \
    --cc=bert.hubert@netherlabs.nl \
    --cc=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®