Skip to contentSkip to conversation

nohz fixes

GIT PULL New Frederic Weisbecker 2 participants 4 messages Jul 24, 2013 – Jul 25, 2013 Nohz, dynticks support

lore
Share & tools
lore
#0 lore raw

Ingo,

Please pull the timers/urgent branch that can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
timers/urgent

Just one thing you need to know: you reported me that the warning was "too much" to tell the user that he can't use full dynticks due to unstable tsc.

I discussed that with Steve and we concluded that we could keep the warning but only trigger it if the user explicitly wants to use the full dynticks which we deduce by checking if he filled the nohz_full= boot parameter or he selected CONFIG_NO_HZ_FULL_ALL. This way we make sure that the user knows what's going on but only if he really expected to use it.

If you still consider the tainting warning to be too much a hammer, even if only real users are warned, then tell me and I'll change that to some way you prefer.

Thanks,
Frederic
---

Li Zhong (1):
nohz: fix compile warning in tick_nohz_init()

Steven Rostedt (1):
nohz: Do not warn about unstable tsc unless user uses nohz_full

 kernel/time/tick-sched.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
#1 lore raw

PATCH 1/2 nohz: Do not warn about unstable tsc unless user uses nohz_full

From: Steven Rostedt <[email protected]>

If the user enables CONFIG_NO_HZ_FULL and runs the kernel on a machine with an unstable TSC, it will produce a WARN_ON dump as well as taint the kernel. This is a bit extreme for a kernel that just enables a feature but doesn't use it.

The warning should only happen if the user tries to use the feature by either adding nohz_full to the kernel command line, or by enabling CONFIG_NO_HZ_FULL_ALL that makes nohz used on all CPUs at boot up. Note, this second feature should not (yet) be used by distros or anyone that doesn't care if NO_HZ is used or not.

Cc Paul E. McKenney <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Li Zhong <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 kernel/time/tick-sched.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
kernel/time/tick-sched.c +2 -1
index e80183f..1102534 100644
@@ -182,7 +182,8 @@ static bool can_stop_full_tick(void)
 		 * Don't allow the user to think they can get
 		 * full NO_HZ with this machine.
 		 */
-		WARN_ONCE(1, "NO_HZ FULL will not work with unstable sched clock");
+		WARN_ONCE(have_nohz_full_mask,
+			  "NO_HZ FULL will not work with unstable sched clock");
 		return false;
 	}
 #endif
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 2/2 nohz: fix compile warning in tick_nohz_init()

In reply to Frederic Weisbecker

From: Li Zhong <[email protected]>

cpu is not used after commit 5b8621a68fdcd2baf1d3b413726f913a5254d46a

Cc Steven Rostedt <[email protected]>
Cc Paul E. McKenney <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Li Zhong <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 kernel/time/tick-sched.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
kernel/time/tick-sched.c +0 -2
index 1102534..9563c74 100644
@@ -344,8 +344,6 @@ static int tick_nohz_init_all(void)
 
 void __init tick_nohz_init(void)
 {
-	int cpu;
-
 	if (!have_nohz_full_mask) {
 		if (tick_nohz_init_all() < 0)
 			return;
Signature · 1 line
1.7.5.4
maintainer
#3 lore raw
In reply to Frederic Weisbecker
Quoted 28 lines · Frederic Weisbecker

Ingo,

Please pull the timers/urgent branch that can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
timers/urgent

Just one thing you need to know: you reported me that the warning was "too much" to tell the user that he can't use full dynticks due to unstable tsc.

I discussed that with Steve and we concluded that we could keep the warning but only trigger it if the user explicitly wants to use the full dynticks which we deduce by checking if he filled the nohz_full= boot parameter or he selected CONFIG_NO_HZ_FULL_ALL. This way we make sure that the user knows what's going on but only if he really expected to use it.

If you still consider the tainting warning to be too much a hammer, even if only real users are warned, then tell me and I'll change that to some way you prefer.

Thanks,
Frederic
---

Li Zhong (1):
nohz: fix compile warning in tick_nohz_init()

Quoted 6 lines

Steven Rostedt (1):
nohz: Do not warn about unstable tsc unless user uses nohz_full

 kernel/time/tick-sched.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Pulled, thanks Frederic!

Ingo