mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Thomas Schlichter <thomas.schlichter@web.de>
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: linux-2.6.0-test9-mm3_acpi-pm-monotonic-fix_A0
Date: 18 Nov 2003 14:59:14 -0800	[thread overview]
Message-ID: <1069196353.11424.2179.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <200311180046.14787.thomas.schlichter@web.de>

On Mon, 2003-11-17 at 15:46, Thomas Schlichter wrote:

> Well, but the sched_clock() -> monotonic_clock() patch seems to have a 
> problem...
> First, everything works smoothly if the PIT or the TSC clock are selected. (It 
> seems I cannot test the HPET timer due to missing hardware support)
> 
> 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). 

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.

thanks
-john


diff -Nru a/arch/i386/kernel/timers/timer_pm.c b/arch/i386/kernel/timers/timer_pm.c
--- a/arch/i386/kernel/timers/timer_pm.c	Tue Nov 18 14:17:27 2003
+++ b/arch/i386/kernel/timers/timer_pm.c	Tue Nov 18 14:17:27 2003
@@ -149,8 +149,8 @@
 	
 
 	/* convert to nanoseconds */
-	ret = base + ((this_offset - last_offset) & ACPI_PM_MASK);
-	ret = cyc2us(ret)*1000;
+	ret = ((this_offset - last_offset) & ACPI_PM_MASK);
+	ret = base + (cyc2us(ret)*1000);
 	return ret;
 }
 






  reply	other threads:[~2003-11-18 23:05 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               ` john stultz [this message]
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

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=1069196353.11424.2179.camel@cog.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --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=linux@brodo.de \
    --cc=papadako@csd.uoc.gr \
    --cc=prakashpublic@gmx.de \
    --cc=s864@ii.uib.no \
    --cc=thomas.schlichter@web.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®