summaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-07-10 00:55:25 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2013-08-13 00:54:07 +0200
commit2e70933866ace52091a3c11a5c104c063ab0c445 (patch)
treef931632cac249a8ca504eb4b0fa9373441d9cc89 /kernel/time
parentd65ec12127a5b6c6d7f5331c78157dab98a20ff0 (diff)
downloadlinux-2e70933866ace52091a3c11a5c104c063ab0c445.tar.bz2
nohz: Only enable context tracking on full dynticks CPUs
The context tracking subsystem has the ability to selectively enable the tracking on any defined subset of CPU. This means that we can define a CPU range that doesn't run the context tracking and another range that does. Now what we want in practice is to enable the tracking on full dynticks CPUs only. In order to perform this, we just need to pass our full dynticks CPU range selection from the full dynticks subsystem to the context tracking. This way we can spare the overhead of RCU user extended quiescent state and vtime maintainance on the CPUs that are outside the full dynticks range. Just keep in mind the raw context tracking itself is still necessary everywhere. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/tick-sched.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 9563c744dad2..91a2528b5f44 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -23,6 +23,7 @@
#include <linux/irq_work.h>
#include <linux/posix-timers.h>
#include <linux/perf_event.h>
+#include <linux/context_tracking.h>
#include <asm/irq_regs.h>
@@ -344,11 +345,16 @@ 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;
}
+ for_each_cpu(cpu, nohz_full_mask)
+ context_tracking_cpu_set(cpu);
+
cpu_notifier(tick_nohz_cpu_down_callback, 0);
cpulist_scnprintf(nohz_full_buf, sizeof(nohz_full_buf), nohz_full_mask);
pr_info("NO_HZ: Full dynticks CPUs: %s.\n", nohz_full_buf);