All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Matthew Whitehead <tedheadster@gmail.com>,
	john.stultz@linaro.org, LKML <linux-kernel@vger.kernel.org>,
	mwhitehe@redhat.com
Subject: Re: nohz problem with idle time on old hardware
Date: Wed, 13 Nov 2013 08:17:19 -0800	[thread overview]
Message-ID: <20131113161719.GD4138@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1311131635580.30673@ionos.tec.linutronix.de>

On Wed, Nov 13, 2013 at 04:50:20PM +0100, Thomas Gleixner wrote:
> On Wed, 13 Nov 2013, Steven Rostedt wrote:
> > > I'm not saying that we are actually getting into nohz, but something
> > > with the nohz code is messing with cpu accounting.
> > 
> > The trace does indeed show that a tick is happening, as the config has
> > HZ=250 (4ms) and we see a tick happen every 4ms. But for some reason,
> > we don't update the the idle time correctly when nohz is enabled.
> > 
> > When I say nohz is enabled, I mean that we don't have nohz=off in the
> > command line. There seems to be some difference between having nohz=off
> > and having nohz disabled at runtime.
> 
> Right that affects tick_nohz_enabled
> 
> Two files use this variable:
> kernel/rcu/tree_plugin.h
> kernel/time/tick-sched.c
> 
> The only accounting related stuff is in tick-sched.c:
> 
> get_cpu_idle_time_us() and get_cpu_iowait_time_us()
> 
> Both functions bail out if (!tick_nohz_enabled).
> 
> The users of get_cpu_idle_time_us() are cpufreq and fs/proc/stat.c!
> 
> Now the simplest fix is to let those functions check whether we
> actually switched into NOHZ mode. Should work for the RCU tree stuff
> as well.

RCU's use of tick_nohz_enabled is for the RCU_FAST_NO_HZ stuff.  If
it sees !tick_nohz_enabled, it skips trying to get RCU out of the way
of disabling the scheduling-clock tick.  If RCU detects a change
in the value of tick_nohz_enabled, it does a raise_softirq() to
force re-evaluation of the situation.

							Thanx, Paul


  reply	other threads:[~2013-11-13 16:17 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 11:39 nohz problem with idle time on old hardware Matthew Whitehead
2013-11-13 14:02 ` Thomas Gleixner
2013-11-13 15:21   ` Steven Rostedt
2013-11-13 15:31     ` Steven Rostedt
2013-11-13 15:50       ` Thomas Gleixner
2013-11-13 16:17         ` Paul E. McKenney [this message]
2013-11-13 15:57       ` Steven Rostedt
2013-11-13 16:07         ` Thomas Gleixner
2013-11-13 16:12           ` Steven Rostedt
2013-11-13 16:18             ` Paul E. McKenney
2013-11-13 16:23               ` Steven Rostedt
2013-11-13 16:35                 ` Paul E. McKenney
2013-11-13 20:01                   ` Thomas Gleixner
2013-11-13 20:07                     ` Steven Rostedt
2013-11-13 21:49                       ` Matthew Whitehead
2013-11-18 22:44                     ` Paul E. McKenney
2013-11-19 18:07                     ` [tip:timers/urgent] NOHZ: Check for nohz active instead of nohz enabled tip-bot for Thomas Gleixner
2014-04-09 13:51                     ` nohz problem with idle time on old hardware Viresh Kumar
2014-04-09 14:31                       ` Steven Rostedt
2014-04-09 15:20                         ` Viresh Kumar
2014-04-09 15:29                           ` Steven Rostedt
2014-04-09 15:31                             ` Steven Rostedt
2014-04-09 15:34                               ` Viresh Kumar
2014-04-09 15:39                               ` Steven Rostedt
2014-04-09 15:56                                 ` Viresh Kumar
2014-04-09 16:15                                   ` Steven Rostedt
2014-04-09 15:11                       ` Frederic Weisbecker
2013-11-13 16:21           ` Thomas Gleixner
2013-11-13 16:31             ` Steven Rostedt

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=20131113161719.GD4138@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mwhitehe@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tedheadster@gmail.com \
    --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 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.