public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Torben Hohn <torbenh@gmx.de>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	hch@infradead.org, yong.zhang0@gmail.com
Subject: Re: [PATCH 01/18] move do_timer() from kernel/timer.c into kernel/time/timekeeping.c
Date: Mon, 24 Jan 2011 12:32:49 -0800	[thread overview]
Message-ID: <1295901169.4845.29.camel@work-vm> (raw)
In-Reply-To: <1295651224-29823-2-git-send-email-torbenh@gmx.de>

On Sat, 2011-01-22 at 00:06 +0100, Torben Hohn wrote:
> Signed-off-by: Torben Hohn <torbenh@gmx.de>
> ---
>  kernel/time/timekeeping.c |   12 ++++++++++++
>  kernel/timer.c            |   13 -------------
>  2 files changed, 12 insertions(+), 13 deletions(-)
> 
> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
> index d27c756..546d82f 100644
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -946,3 +946,15 @@ struct timespec get_monotonic_coarse(void)
>  				now.tv_nsec + mono.tv_nsec);
>  	return now;
>  }
> +
> +/*
> + * The 64-bit jiffies value is not atomic - you MUST NOT read it
> + * without sampling the sequence number in xtime_lock.
> + * jiffies is defined in the linker script...
> + */
> +void do_timer(unsigned long ticks)
> +{
> +	jiffies_64 += ticks;
> +	update_wall_time();
> +	calc_global_load(ticks);
> +}


I know Thomas suggested this move, but I'm not sure I agree (yet).
Jiffies updates, and load calculations really have much more to do with
the timer irq then with timekeeping, so I'd be prone to leave them in
place. Or maybe move them to the tick scheduling code?

I'm guessing Thomas is thinking to move these bits into timekeeping.c so
xtime_lock can be made static there, it just strikes me oddly.
Especially since jiffies access is still going to need the xtime_lock,
so we'd have to move all the jiffies code into timekeeping.c to do so.

Splitting the xtime_lock int a static timekeeper.lock and a static
jiffies_lock might be the clean way to divide things, but that really
just adds extra locking overhead. But maybe that's not much of an issue.

Thomas: I suspect I'm just not seeing where you're going with this.
Could you clarify a bit? :)

thanks
-john




  parent reply	other threads:[~2011-01-24 20:32 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21 23:06 make arch code use xtime_update() instead of do_timer() Torben Hohn
2011-01-21 23:06 ` [PATCH 01/18] move do_timer() from kernel/timer.c into kernel/time/timekeeping.c Torben Hohn
2011-01-22  9:45   ` Thomas Gleixner
2011-01-24 20:32   ` john stultz [this message]
2011-01-24 22:10     ` Thomas Gleixner
2011-01-24 22:21       ` Peter Zijlstra
2011-01-24 22:44         ` Thomas Gleixner
2011-01-25  9:08           ` Peter Zijlstra
2011-01-25 10:34             ` Peter Zijlstra
2011-01-25 16:51               ` Peter Zijlstra
2011-01-26  5:56                 ` Yong Zhang
2011-01-26  6:49                   ` Yong Zhang
2011-01-26 10:03                   ` Peter Zijlstra
2011-01-26 11:11                     ` Yong Zhang
2011-01-21 23:06 ` [PATCH 02/18] provide xtime_update() which does not require holding xtime_lock like do_timer() Torben Hohn
2011-01-22 10:36   ` Thomas Gleixner
2011-01-21 23:06 ` [PATCH 03/18] alpha: change do_timer() to xtime_update() Torben Hohn
2011-01-21 23:06 ` [PATCH 04/18] arm: switch from " Torben Hohn
2011-01-21 23:06 ` [PATCH 05/18] arm/mach-clps711x: switch " Torben Hohn
2011-01-21 23:06 ` [PATCH 06/18] blackfin: switch from " Torben Hohn
2011-01-21 23:06 ` [PATCH 07/18] cris/arch-v10: switch " Torben Hohn
2011-01-21 23:06 ` [PATCH 08/18] cris/arch-v32: " Torben Hohn
2011-01-21 23:06 ` [PATCH 09/18] frv: " Torben Hohn
2011-01-22 10:01   ` Thomas Gleixner
2011-01-24 12:51     ` torbenh
2011-01-24 13:09       ` Thomas Gleixner
2011-01-21 23:06 ` [PATCH 10/18] h8300: " Torben Hohn
2011-01-21 23:06 ` [PATCH 11/18] ia64: " Torben Hohn
2011-01-21 23:06 ` [PATCH 12/18] m32r: switch from " Torben Hohn
2011-01-21 23:06 ` [PATCH 13/18] m68k: switch " Torben Hohn
2011-01-21 23:07 ` [PATCH 14/18] mn10300: switch do_timer() to xtimer_update() Torben Hohn
2011-01-21 23:07 ` [PATCH 15/18] parisc: switch do_timer() to xtime_update() Torben Hohn
2011-01-21 23:07 ` [PATCH 16/18] sparc: " Torben Hohn
2011-01-22  0:51   ` David Miller
2011-01-21 23:07 ` [PATCH 17/18] xtensa: " Torben Hohn
2011-01-21 23:07 ` [PATCH 18/18] make do_timer() and xtime_lock private to the timer code Torben Hohn
2011-01-22 10:14 ` make arch code use xtime_update() instead of do_timer() Thomas Gleixner

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=1295901169.4845.29.camel@work-vm \
    --to=johnstul@us.ibm.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torbenh@gmx.de \
    --cc=yong.zhang0@gmail.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