提交 2d0640b4 编写于 作者: S Stephen Boyd 提交者: Ingo Molnar

hrtimers: Notify hrtimer users of switches to NOHZ mode

When NOHZ=y and high res timers are disabled (via cmdline or
Kconfig) tick_nohz_switch_to_nohz() will notify the user about
switching into NOHZ mode. Nothing is printed for the case where
HIGH_RES_TIMERS=y. Fix this for the HIGH_RES_TIMERS=y case by
duplicating the printk from the low res NOHZ path in the high
res NOHZ path.

This confused me since I was thinking 'dmesg | grep -i NOHZ' would
tell me if NOHZ was enabled, but if I have hrtimers there is
nothing.
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
Acked-by: NThomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1295419594-13085-1-git-send-email-sboyd@codeaurora.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 c56eb8fb
...@@ -642,8 +642,7 @@ static void tick_nohz_switch_to_nohz(void) ...@@ -642,8 +642,7 @@ static void tick_nohz_switch_to_nohz(void)
} }
local_irq_enable(); local_irq_enable();
printk(KERN_INFO "Switched to NOHz mode on CPU #%d\n", printk(KERN_INFO "Switched to NOHz mode on CPU #%d\n", smp_processor_id());
smp_processor_id());
} }
/* /*
...@@ -795,8 +794,10 @@ void tick_setup_sched_timer(void) ...@@ -795,8 +794,10 @@ void tick_setup_sched_timer(void)
} }
#ifdef CONFIG_NO_HZ #ifdef CONFIG_NO_HZ
if (tick_nohz_enabled) if (tick_nohz_enabled) {
ts->nohz_mode = NOHZ_MODE_HIGHRES; ts->nohz_mode = NOHZ_MODE_HIGHRES;
printk(KERN_INFO "Switched to NOHz mode on CPU #%d\n", smp_processor_id());
}
#endif #endif
} }
#endif /* HIGH_RES_TIMERS */ #endif /* HIGH_RES_TIMERS */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册