summaryrefslogtreecommitdiff
path: root/kernel/time
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-04-24 09:39:24 +0200
committerIngo Molnar <mingo@kernel.org>2013-04-24 09:39:24 +0200
commit447a34a2b77da949ea0870c2bef9b501d2d4c4ab (patch)
treeef6bcfbcd99ddbe366f1de94b6aa75da7c6ea55f /kernel/time
parentbf967be396d0c6a52668921e7223856349d04b5e (diff)
parentcb41a29076e9f95547da46578d5c8804f7b8845d (diff)
downloadlwn-447a34a2b77da949ea0870c2bef9b501d2d4c4ab.tar.gz
lwn-447a34a2b77da949ea0870c2bef9b501d2d4c4ab.zip
Merge branch 'timers/nohz-help-testing' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into timers/nohz
Pull full dynticks helpers from Frederic Weisbecker: - handy tracepoints that allow dynticks analysis, to answer "why does my tick not stop??" questions - select CONFIG_RCU_NOCB_ALL Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/Kconfig1
-rw-r--r--kernel/time/tick-sched.c19
2 files changed, 16 insertions, 4 deletions
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
index f6a792ab4983..e1ac129b01c9 100644
--- a/kernel/time/Kconfig
+++ b/kernel/time/Kconfig
@@ -110,6 +110,7 @@ config NO_HZ_FULL
select NO_HZ_COMMON
select RCU_USER_QS
select RCU_NOCB_CPU
+ select RCU_NOCB_CPU_ALL
select CONTEXT_TRACKING_FORCE
select IRQ_WORK
help
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 12a900dbb819..85e05ab98253 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -28,6 +28,8 @@
#include "tick-internal.h"
+#include <trace/events/timer.h>
+
/*
* Per cpu nohz control structure
*/
@@ -153,14 +155,20 @@ static bool can_stop_full_tick(void)
{
WARN_ON_ONCE(!irqs_disabled());
- if (!sched_can_stop_tick())
+ if (!sched_can_stop_tick()) {
+ trace_tick_stop(0, "more than 1 task in runqueue\n");
return false;
+ }
- if (!posix_cpu_timers_can_stop_tick(current))
+ if (!posix_cpu_timers_can_stop_tick(current)) {
+ trace_tick_stop(0, "posix timers running\n");
return false;
+ }
- if (!perf_event_can_stop_tick())
+ if (!perf_event_can_stop_tick()) {
+ trace_tick_stop(0, "perf events running\n");
return false;
+ }
/* sched_clock_tick() needs us? */
#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
@@ -168,8 +176,10 @@ static bool can_stop_full_tick(void)
* TODO: kick full dynticks CPUs when
* sched_clock_stable is set.
*/
- if (!sched_clock_stable)
+ if (!sched_clock_stable) {
+ trace_tick_stop(0, "unstable sched clock\n");
return false;
+ }
#endif
return true;
@@ -631,6 +641,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
ts->last_tick = hrtimer_get_expires(&ts->sched_timer);
ts->tick_stopped = 1;
+ trace_tick_stop(1, " ");
}
/*