From: tip-bot for Stephen Boyd <sboyd@codeaurora.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, tglx@linutronix.de, sboyd@codeaurora.org,
mingo@elte.hu
Subject: [tip:timers/urgent] hrtimers: Notify hrtimer users of switches to NOHZ mode
Date: Wed, 19 Jan 2011 19:03:46 GMT [thread overview]
Message-ID: <tip-fe96565ce90aca25786d709ebb5fb5e49b8bbafe@git.kernel.org> (raw)
In-Reply-To: <1295419594-13085-1-git-send-email-sboyd@codeaurora.org>
Commit-ID: fe96565ce90aca25786d709ebb5fb5e49b8bbafe
Gitweb: http://git.kernel.org/tip/fe96565ce90aca25786d709ebb5fb5e49b8bbafe
Author: Stephen Boyd <sboyd@codeaurora.org>
AuthorDate: Tue, 18 Jan 2011 22:46:34 -0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 19 Jan 2011 12:08:44 +0100
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: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Thomas 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: Ingo Molnar <mingo@elte.hu>
---
kernel/time/tick-sched.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 3e216e0..9760f4f 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -640,10 +640,8 @@ static void tick_nohz_switch_to_nohz(void)
break;
next = ktime_add(next, tick_period);
}
+ printk(KERN_INFO "Switched to NOHz mode on CPU #%d\n", smp_processor_id());
local_irq_enable();
-
- printk(KERN_INFO "Switched to NOHz mode on CPU #%d\n",
- smp_processor_id());
}
/*
@@ -795,8 +793,11 @@ void tick_setup_sched_timer(void)
}
#ifdef CONFIG_NO_HZ
- if (tick_nohz_enabled)
+ if (tick_nohz_enabled) {
ts->nohz_mode = NOHZ_MODE_HIGHRES;
+ pr_info("Switched to NOHz mode on CPU #%d\n",
+ smp_processor_id());
+ }
#endif
}
#endif /* HIGH_RES_TIMERS */
next prev parent reply other threads:[~2011-01-19 19:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 6:46 [PATCH] sched: Notify hrtimer users of switches to NOHZ mode Stephen Boyd
2011-01-19 11:43 ` Peter Zijlstra
2011-01-19 12:04 ` Ingo Molnar
2011-01-19 19:03 ` tip-bot for Stephen Boyd [this message]
2011-01-19 19:09 ` [tip:timers/urgent] hrtimers: " tip-bot for Stephen Boyd
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-fe96565ce90aca25786d709ebb5fb5e49b8bbafe@git.kernel.org \
--to=sboyd@codeaurora.org \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox