Skip to contentSkip to conversation

nohz: disable traceback on NO_HZ warning

PATCH In review Stephen Hemminger 1 participant 2 messages Dec 14, 2015 Nohz, dynticks support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nohz: disable traceback on NO_HZ warning

From: "Charles (Chas) Williams" <[email protected]>

A NO_HZ_FULL kernel needs to have a stable clock source like a non-stop (or invariant) TSC. Unfortunately, this CPU feature/flag isn't advertised by most hypervisors because they want the ability to migrate or save virtual machines which would affect the TSC.

This means that a kernel with NO_HZ_FULL configured would often generate a kernel traceback on boot which causes users to generate false alarms. NO_HZ_FULL is an optimization not a hard requirement. Keep the message, just lose the traceback.

---
 kernel/time/tick-sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/time/tick-sched.c +2 -2
index 7c7ec45..2e1c90c 100644
@@ -188,8 +188,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(tick_nohz_full_running,
-			  "NO_HZ FULL will not work with unstable sched clock");
+		if (tick_nohz_full_running)
+			pr_notice_once("NO_HZ FULL will not work with unstable sched clock\n");
 		return false;
 	}
 #endif
Signature · 1 line
2.1.4
#1 lore raw
Quoted 23 lines · On Mon, 14 Dec 2015 10:26:07 -0800 Stephen Hemminger…

From: "Charles (Chas) Williams" <[email protected]>

A NO_HZ_FULL kernel needs to have a stable clock source like a non-stop (or invariant) TSC. Unfortunately, this CPU feature/flag isn't advertised by most hypervisors because they want the ability to migrate or save virtual machines which would affect the TSC.

This means that a kernel with NO_HZ_FULL configured would often generate a kernel traceback on boot which causes users to generate false alarms. NO_HZ_FULL is an optimization not a hard requirement. Keep the message, just lose the traceback.

---
 kernel/time/tick-sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/time/tick-sched.c +0 -0
index 7c7ec45..2e1c90c 100644

kernel/time/tick-sched.c static bool can_stop_full_tick(void) · line 195

Quoted 10 lines
kernel/time/tick-sched.c +2 -2
@@ -188,8 +188,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(tick_nohz_full_running,
-			  "NO_HZ FULL will not work with unstable sched clock");
+		if (tick_nohz_full_running)
+			pr_notice_once("NO_HZ FULL will not work with unstable sched clock\n");
 		return false;
 	}
 #endif

Never mind, wrong list