From: Thomas Schlichter <thomas.schlichter@web.de>
To: john stultz <johnstul@us.ibm.com>
Cc: "Prakash K. Cheemplavam" <prakashpublic@gmx.de>,
"Ronny V. Vindenes" <s864@ii.uib.no>,
Andrew Morton <akpm@osdl.org>,
lkml <linux-kernel@vger.kernel.org>,
cat@zip.com.au, gawain@freda.homelinux.org,
gene.heskett@verizon.net, papadako@csd.uoc.gr,
Dominik Brodowski <linux@brodo.de>
Subject: Re: linux-2.6.0-test9-mm3_acpi-pm-monotonic-fix_A0
Date: Wed, 19 Nov 2003 08:34:23 +0100 [thread overview]
Message-ID: <200311190834.23873.thomas.schlichter@web.de> (raw)
In-Reply-To: <1069196353.11424.2179.camel@cog.beaverton.ibm.com>
[-- Attachment #1.1: Type: text/plain, Size: 1463 bytes --]
On Tuesday 18 November 2003 23:59, john stultz wrote:
> On Mon, 2003-11-17 at 15:46, Thomas Schlichter wrote:
> > But when booting with the PMTMR clock selected, my Interactivity test
> > fails again. :-( Maybe there is a problem in the PMTMR's monotonic clock
> > part...?!
>
> Good call! I was mis-adding in conversion to nanoseconds. The patch
> below should fix it (Andrew, feel free to ignore this, I'll sync up all
> the acpi-pm changes with you later).
Well, your patch was the correct direction, but it did not completely reach
the target... :-( The 'monotonic_base' variable in the PMTMR stores its value
in microseconds. So the 'base' value has to be convertet to nanoseconds,
too...
A patch that corrects that is attached...
(Btw. another solution would be to store all the values in nanoseconds by
replacing the cyc2us function with a cyc2ns function...)
> Although I'm finding that the sched_clock->monotonic_clock patch doesn't
> look like a win. With that patch sched_clock takes ~400-700 cycles using
> clock=pmtmr. With your "fix-sched_clock.diff" patch its less then 40
> cycles.
>
> While better accuracy is nice, I can't imagine the 10-20x cost of
> sched_clock is worth it. So I think your fix is the best solution.
I think you are right, but the sched_clock->monotonic_clock patch helped us
finding the problems in the monotonic_clock_pmtmr() function... ;-)
> thanks
> -john
np ;-)
Thomas
[-- Attachment #1.2: fix-monotonic_pmtmr-2.diff --]
[-- Type: text/x-diff, Size: 452 bytes --]
--- linux-2.6.0-test9-mm3_patched/arch/i386/kernel/timers/timer_pm.c.orig Wed Nov 19 08:05:19 2003
+++ linux-2.6.0-test9-mm3_patched/arch/i386/kernel/timers/timer_pm.c Wed Nov 19 08:07:41 2003
@@ -150,7 +150,7 @@ static unsigned long long monotonic_cloc
/* convert to nanoseconds */
ret = ((this_offset - last_offset) & ACPI_PM_MASK);
- ret = base + (cyc2us(ret)*1000);
+ ret = (base + cyc2us(ret)) * NSEC_PER_USEC;
return ret;
}
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-11-19 7:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-17 12:11 Terrible interactivity with 2.6.0-t9-mm3 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 ` Thomas Schlichter [this message]
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
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=200311190834.23873.thomas.schlichter@web.de \
--to=thomas.schlichter@web.de \
--cc=akpm@osdl.org \
--cc=cat@zip.com.au \
--cc=gawain@freda.homelinux.org \
--cc=gene.heskett@verizon.net \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@brodo.de \
--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 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.