From: Willy Tarreau <willy@w.ods.org>
To: dean gaudet <dean-list-linux-kernel@arctic.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: CONFIG_X86_PM_TIMER is slow
Date: Fri, 12 Nov 2004 11:07:32 +0100 [thread overview]
Message-ID: <20041112100732.GA12845@alpha.home.local> (raw)
In-Reply-To: <Pine.LNX.4.61.0411112339100.24919@twinlark.arctic.org>
On Thu, Nov 11, 2004 at 11:43:14PM -0800, dean gaudet wrote:
> > 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));
> >
> > Just a thought : have you tried to check whether it's the recovery time
> > after a read or read itself which takes time ?
>
> each read is ~0.8us ... the loop only runs once.
OK, but here, 2 of these 3 reads are done after another one.
For example, does it change anything to add something like this :
do {
volatile int slow;
v1 = inl(pmtr_ioport);
for (slow = 500; slow--;);
v2 = inl(pmtr_ioport);
for (slow = 500; slow--;);
v3 = inl(pmtr_ioport);
} while ...
If it does not change anything, then it means that there is a recovery
time after a read, which would imply that the 3 back-to-back reads are
more harmful than it seems.
> > Other thought : is it possible to memory-map this timer to avoid the slow
> > inl() on x86 ?
>
> that's how the even newer HPET works ... but not all systems have HPET.
OK, thanks for the info, I didn't know about that.
Regards,
Willy
next prev parent reply other threads:[~2004-11-12 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-12 5:52 CONFIG_X86_PM_TIMER is slow dean gaudet
2004-11-12 6:04 ` Willy Tarreau
2004-11-12 6:16 ` dean gaudet
2004-11-12 7:06 ` Willy Tarreau
2004-11-12 7:43 ` dean gaudet
2004-11-12 10:07 ` Willy Tarreau [this message]
2004-11-16 8:10 ` George Anzinger
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=20041112100732.GA12845@alpha.home.local \
--to=willy@w.ods.org \
--cc=dean-list-linux-kernel@arctic.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.