From: tip-bot for Eero Nurkkala <ext-eero.nurkkala@nokia.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
greg@kroah.com, venkatesh.pallipadi@intel.com, riel@redhat.com,
steven@uplinklabs.net, ext-eero.nurkkala@nokia.com,
tglx@linutronix.de
Subject: [tip:timers/urgent] NOHZ: update idle state also when NOHZ is inactive
Date: Wed, 7 Oct 2009 11:06:45 GMT [thread overview]
Message-ID: <tip-fdc6f192e7e1ae80565af23cc33dc88e3dcdf184@git.kernel.org> (raw)
In-Reply-To: <1254907901.30157.93.camel@eenurkka-desktop>
Commit-ID: fdc6f192e7e1ae80565af23cc33dc88e3dcdf184
Gitweb: http://git.kernel.org/tip/fdc6f192e7e1ae80565af23cc33dc88e3dcdf184
Author: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
AuthorDate: Wed, 7 Oct 2009 11:54:26 +0300
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 7 Oct 2009 13:05:05 +0200
NOHZ: update idle state also when NOHZ is inactive
Commit f2e21c9610991e95621a81407cdbab881226419b had unfortunate side
effects with cpufreq governors on some systems.
If the system did not switch into NOHZ mode ts->inidle is not set when
tick_nohz_stop_sched_tick() is called from the idle routine. Therefor
all subsequent calls from irq_exit() to tick_nohz_stop_sched_tick()
fail to call tick_nohz_start_idle(). This results in bogus idle
accounting information which is passed to cpufreq governors.
Set the inidle flag unconditionally of the NOHZ active state to keep
the idle time accounting correct in any case.
[ tglx: Added comment and tweaked the changelog ]
Reported-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Greg KH <greg@kroah.com>
Cc: Steven Noonan <steven@uplinklabs.net>
Cc: stable@kernel.org
LKML-Reference: <1254907901.30157.93.camel@eenurkka-desktop>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/tick-sched.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index e0f59a2..89aed59 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -231,6 +231,13 @@ void tick_nohz_stop_sched_tick(int inidle)
if (!inidle && !ts->inidle)
goto end;
+ /*
+ * Set ts->inidle unconditionally. Even if the system did not
+ * switch to NOHZ mode the cpu frequency governers rely on the
+ * update of the idle time accounting in tick_nohz_start_idle().
+ */
+ ts->inidle = 1;
+
now = tick_nohz_start_idle(ts);
/*
@@ -248,8 +255,6 @@ void tick_nohz_stop_sched_tick(int inidle)
if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))
goto end;
- ts->inidle = 1;
-
if (need_resched())
goto end;
next prev parent reply other threads:[~2009-10-07 11:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-05 16:32 [BISECTED] "conservative" cpufreq governor broken Steven Noonan
2009-10-06 7:31 ` Eero Nurkkala
2009-10-06 10:22 ` Steven Noonan
2009-10-06 10:43 ` Eero Nurkkala
2009-10-06 11:22 ` Steven Noonan
2009-10-06 12:36 ` Eero Nurkkala
2009-10-07 0:54 ` Steven Noonan
2009-10-07 1:22 ` Steven Noonan
2009-10-07 5:27 ` Eero Nurkkala
2009-10-07 7:30 ` Steven Noonan
2009-10-07 7:49 ` Eero Nurkkala
2009-10-07 8:05 ` Steven Noonan
2009-10-07 8:11 ` Steven Noonan
2009-10-07 8:14 ` Eero Nurkkala
2009-10-07 8:24 ` Steven Noonan
2009-10-07 8:43 ` Eero Nurkkala
2009-10-07 8:52 ` Steven Noonan
2009-10-07 9:31 ` Eero Nurkkala
2009-10-07 10:42 ` Thomas Gleixner
2009-10-07 11:03 ` Steven Noonan
2009-10-07 11:15 ` Thomas Gleixner
2009-10-07 11:06 ` tip-bot for Eero Nurkkala [this message]
2009-10-07 13:35 ` [tip:timers/urgent] NOHZ: update idle state also when NOHZ is inactive Rik van Riel
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=tip-fdc6f192e7e1ae80565af23cc33dc88e3dcdf184@git.kernel.org \
--to=ext-eero.nurkkala@nokia.com \
--cc=greg@kroah.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=riel@redhat.com \
--cc=steven@uplinklabs.net \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.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 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.