From: Thomas Gleixner <tglx@linutronix.de>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: john stultz <johnstul@us.ibm.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Daniel Walker <dwalker@fifo99.com>
Subject: Re: [patch 02/14] remove clocksource inline functions
Date: Fri, 14 Aug 2009 10:17:01 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.0908141015540.1283@localhost.localdomain> (raw)
In-Reply-To: <20090814101013.43e88657@skybase>
On Fri, 14 Aug 2009, Martin Schwidefsky wrote:
> On Thu, 13 Aug 2009 15:14:34 -0700
> john stultz <johnstul@us.ibm.com> wrote:
> > So you'll need to preserve the cycle_last = 0 line.
>
> Whoa, now that is subtle. Good spotting. I would prefer to reset the
> cycle_last in a resume function though:
>
> Index: linux-2.6/arch/x86/kernel/tsc.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/tsc.c
> +++ linux-2.6/arch/x86/kernel/tsc.c
> @@ -744,10 +744,16 @@ static cycle_t __vsyscall_fn vread_tsc(v
> }
> #endif
>
> +static void resume_tsc(void)
> +{
> + clocksource_tsc.cycle_last = 0;
> +}
> +
> static struct clocksource clocksource_tsc = {
> .name = "tsc",
> .rating = 300,
> .read = read_tsc,
> + .resume = resume_tsc,
> .mask = CLOCKSOURCE_MASK(64),
> .shift = 22,
> .flags = CLOCK_SOURCE_IS_CONTINUOUS |
>
> That puts the subtlety where it belongs.
Ack.
tglx
next prev parent reply other threads:[~2009-08-14 8:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090813154034.613706651@de.ibm.com>
[not found] ` <20090813154159.634291990@de.ibm.com>
2009-08-13 22:14 ` [patch 02/14] remove clocksource inline functions john stultz
2009-08-14 8:10 ` Martin Schwidefsky
2009-08-14 8:17 ` Thomas Gleixner [this message]
[not found] ` <20090813154201.810817188@de.ibm.com>
2009-08-13 23:30 ` [patch 11/14] timekeeper read clock helper functions john stultz
2009-08-14 11:12 ` Martin Schwidefsky
2009-08-14 0:28 ` [patch 00/14] clocksource / timekeeping rework V3 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=alpine.LFD.2.00.0908141015540.1283@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=dwalker@fifo99.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=schwidefsky@de.ibm.com \
/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