public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dimitri Sivanich <sivanich@sgi.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] specific do_timer_cpu value for nohz off mode
Date: Thu, 16 Feb 2012 08:59:00 -0600	[thread overview]
Message-ID: <20120216145900.GA3772@sgi.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1202152131280.2794@ionos>

On Wed, Feb 15, 2012 at 09:36:47PM +0100, Thomas Gleixner wrote:
> On Wed, 15 Feb 2012, Dimitri Sivanich wrote:
> > On Wed, Feb 15, 2012 at 03:52:06PM +0100, Thomas Gleixner wrote:
> > > So the first CPU which registers a clock event device takes it. That's
> > > the boot CPU, no matter what.
> > >
> > Both kernel tracing and the original patch that I proposed for this
> > showed plainly (at the time) that the tick_do_timer_cpu was not always cpu 0
> > prior to modifying it for nohz=off.  Maybe that is no longer the case?
> 
> This logic has not been changed in years.

I did some tracing of all points where tick_do_timer_cpu is set in the
3.3.0-rc3+ kernel.

> 
> tick_do_timer_cpu is initialized to TICK_DO_TIMER_BOOT and the first
> cpu which registers either a global or a per cpu clock event device
> takes it over. This is at least on x86 always the boot cpu, i.e. cpu0.
> After that point nothing touches that variable when nohz is disabled
> (runtime or compile time).

At that point it is set to cpu 0.  However, when we go into highres mode
it does change.  Below are the two places it was set during boot with
nohz=off on one of our x86 based machines.

[    0.000000] tick_setup_device: tick_do_timer_cpu 0
[    1.924098] tick_broadcast_setup_oneshot: tick_do_timer_cpu 17

So in this example it's now cpu 17, and it stays that way from that point on.

A traceback at that point shows tick_init_highres is indeed initiating this:

[    1.924863]  [<ffffffff81087e01>] tick_broadcast_setup_oneshot+0x71/0x160
[    1.924863]  [<ffffffff81087f23>] tick_broadcast_switch_to_oneshot+0x33/0x50
[    1.924863]  [<ffffffff81088841>] tick_switch_to_oneshot+0x81/0xd0
[    1.924863]  [<ffffffff810888a0>] tick_init_highres+0x10/0x20
[    1.924863]  [<ffffffff81061e71>] hrtimer_run_pending+0x71/0xd0

> 
> So I really want to see proper proof why that would not be the
> case. If it really happens then we fix the root cause instead of
> adding random sysfs interfaces.

If you're willing to consider it a bug that tick_do_timer_cpu is not cpu 0,
than I'm very much in agreement.

> 
> Thanks,
> 
> 	tglx

  reply	other threads:[~2012-02-16 14:59 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 19:11 [PATCH] specific do_timer_cpu value for nohz off mode Dimitri Sivanich
2011-11-23  0:08 ` Andrew Morton
2011-11-30 15:29   ` Dimitri Sivanich
2011-12-01  0:11     ` Andrew Morton
2011-12-01  0:16       ` Andrew Morton
2011-12-01  2:07         ` Dimitri Sivanich
2011-12-01  2:13           ` Andrew Morton
2011-12-01 16:37             ` Dimitri Sivanich
2011-12-01 22:56               ` Andrew Morton
2011-12-02 20:14                 ` Dimitri Sivanich
2011-12-02 20:22                   ` Dimitri Sivanich
2011-12-02 22:42                   ` Thomas Gleixner
2011-12-01  2:06       ` Dimitri Sivanich
2011-12-01  2:12         ` Andrew Morton
2011-12-01  2:34           ` Dimitri Sivanich
2011-12-01  2:38             ` Andrew Morton
2012-01-15 13:46 ` Mike Galbraith
2012-01-15 14:04   ` Mike Galbraith
2012-01-15 14:23   ` Mike Galbraith
2012-01-25 11:27   ` Mike Galbraith
2012-02-15 14:16 ` Thomas Gleixner
2012-02-15 14:37   ` Dimitri Sivanich
2012-02-15 14:52     ` Thomas Gleixner
2012-02-15 15:34       ` Dimitri Sivanich
2012-02-15 20:36         ` Thomas Gleixner
2012-02-16 14:59           ` Dimitri Sivanich [this message]
2013-03-19 17:03             ` [PATCH][RFC] " Jiri Bohac
  -- strict thread matches above, loose matches on Subject: below --
2011-08-17 16:07 [PATCH] " Dimitri Sivanich
2011-08-17 16:47 ` Thomas Gleixner
2011-08-23 19:56   ` Dimitri Sivanich
2011-09-02  8:19     ` Thomas Gleixner
2011-09-02 19:29       ` Dimitri Sivanich
2011-09-02 19:57         ` Thomas Gleixner
2011-09-02 20:39           ` Dimitri Sivanich
2011-08-03 19:57 Dimitri Sivanich

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=20120216145900.GA3772@sgi.com \
    --to=sivanich@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.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