Ingo Molnar
47aa8b6cbc
nohz: Reduce overhead under high-freq idling patterns
...
One testbox of mine (Intel Nehalem, 16-way) uses MWAIT for its idle routine,
which apparently can break out of its idle loop rather frequently, with
high frequency.
In that case NO_HZ_FULL=y kernels show high ksoftirqd overhead and constant
context switching, because tick_nohz_stop_sched_tick() will, if
delta_jiffies == 0, mis-identify this as a timer event - activating the
TIMER_SOFTIRQ, which wakes up ksoftirqd.
Fix this by treating delta_jiffies == 0 the same way we treat other short
wakeups, delta_jiffies == 1.
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-04-26 10:13:42 +02:00
Frederic Weisbecker
65e709dc0c
nohz: Remove full dynticks' superfluous dependency on RCU tree
...
Remove the dependency on (TREE_RCU || TREE_PREEMPT_RCU). The full
dynticks option already depends on SMP which implies
(whatever flavour of) RCU tree config anyway.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-24 16:17:36 +02:00
Frederic Weisbecker
2c82d1be4d
nohz: Fix unavailable tick_stop tracepoint in dynticks idle
...
The trace_tick_stop() tracepoint is only available in full
dynticks. But it's also used by dynticks-idle so let's build
it for the latter config as well.
This fixes:
kernel/time/tick-sched.c: In function tick_nohz_stop_sched_tick:
kernel/time/tick-sched.c:644: error: implicit declaration of function trace_tick_stop
make[2]: *** [kernel/time/tick-sched.o] Erreur 1
Reported-by: Ingo Molnar <mingo@kernel.org >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-24 15:48:59 +02:00
Ingo Molnar
447a34a2b7
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 >
2013-04-24 09:39:24 +02:00
Ingo Molnar
bf967be396
Merge branch 'timers/nohz' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into timers/nohz
...
Pull nohz-full enabling patches from Frederic Weisbecker:
" This handles perf and CPUs that get more than one task and fix posix cpu timers
handling.
This can finally stop the tick."
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-04-24 09:27:53 +02:00
Frederic Weisbecker
cb41a29076
nohz: Add basic tracing
...
It's not obvious to find out why the full dynticks subsystem
doesn't always stop the tick: whether this is due to kthreads,
posix timers, perf events, etc...
These new tracepoints are here to help the user diagnose
the failures and test this feature.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 23:03:09 +02:00
Frederic Weisbecker
0637e02939
nohz: Select wide RCU nocb for full dynticks
...
It makes testing and implementation much easier as we
know in advance that all CPUs are RCU nocbs.
Also this prepares to remove the dynamic check for
nohz_full= boot mask to be a subset of rcu_nocbs=
Eventually this should also help removing the requirement
for the boot CPU to be outside the full dynticks range.
Suggested-by: Christoph Lameter <cl@linux.com >
Suggested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 23:02:26 +02:00
Frederic Weisbecker
67826eae8c
nohz: Disable the tick when irq resume in full dynticks CPU
...
Eventually try to disable tick on irq exit, now that the
fundamental infrastructure is in place.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 20:29:09 +02:00
Frederic Weisbecker
99e5ada940
nohz: Re-evaluate the tick for the new task after a context switch
...
When a task is scheduled in, it may have some properties
of its own that could make the CPU reconsider the need for
the tick: posix cpu timers, perf events, ...
So notify the full dynticks subsystem when a task gets
scheduled in and re-check the tick dependency at this
stage. This is done through a self IPI to avoid messing
up with any current lock scenario.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 20:29:07 +02:00
Frederic Weisbecker
5811d9963e
nohz: Prepare to stop the tick on irq exit
...
Interrupt exit is a natural place to stop the tick: it happens
after all events happening before and during the irq which
are liable to update the dependency on the tick occured. Also
it makes sure that any check on tick dependency is well ordered
against dynticks kick IPIs.
Bring in the infrastructure that performs the tick dependency
checks on irq exit and shut it down if these checks show that we
can do it safely.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 20:29:05 +02:00
Frederic Weisbecker
9014c45d9e
nohz: Implement full dynticks kick
...
Implement the full dynticks kick that is performed from
IPIs sent by various subsystems (scheduler, posix timers, ...)
when they want to notify about a new event that may
reconsider the dependency on the tick.
Most of the time, such an event end up restarting the tick.
(Part of the design with subsystems providing *_can_stop_tick()
helpers suggested by Peter Zijlstra a while ago).
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 20:28:04 +02:00
Frederic Weisbecker
ff442c51f6
nohz: Re-evaluate the tick from the scheduler IPI
...
The scheduler IPI is used by the scheduler to kick
full dynticks CPUs asynchronously when more than one
task are running or when a new timer list timer is
enqueued. This way the destination CPU can decide
to restart the tick to handle this new situation.
Now let's call that kick in the scheduler IPI.
(Reusing the scheduler IPI rather than implementing
a new IPI was suggested by Peter Zijlstra a while ago)
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 20:16:04 +02:00
Frederic Weisbecker
ce831b38ca
sched: New helper to prevent from stopping the tick in full dynticks
...
Provide a new helper to be called from the full dynticks engine
before stopping the tick in order to make sure we don't stop
it when there is more than one task running on the CPU.
This way we make sure that the tick stays alive to maintain
fairness.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 20:08:04 +02:00
Frederic Weisbecker
9f3660c2c1
sched: Kick full dynticks CPU that have more than one task enqueued.
...
Kick the tick on full dynticks CPUs when they get more
than one task running on their queue. This makes sure that
local fairness is maintained by the tick on the destination.
This is done regardless of these tasks' class. We should
be able to be more clever in the future depending on these. eg:
a CPU that runs a SCHED_FIFO task doesn't need to maintain
fairness against local pending tasks of the fair class.
But keep things simple for now.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 20:06:54 +02:00
Frederic Weisbecker
026249ef10
perf: New helper to prevent full dynticks CPUs from stopping tick
...
Provide a new helper that help full dynticks CPUs to prevent
from stopping their tick in case there are events in the local
rotation list.
This way we make sure that perf_event_task_tick() is serviced
on demand.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Stephane Eranian <eranian@google.com >
Cc: Jiri Olsa <jolsa@redhat.com >
2013-04-22 19:59:39 +02:00
Frederic Weisbecker
12351ef8f9
perf: Kick full dynticks CPU if events rotation is needed
...
Kick the current CPU's tick by sending it a self IPI when
an event is queued on the rotation list and it is the first
element inserted. This makes sure that perf_event_task_tick()
works on full dynticks CPUs.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Stephane Eranian <eranian@google.com >
Cc: Jiri Olsa <jolsa@redhat.com >
2013-04-22 19:59:37 +02:00
Frederic Weisbecker
6ac29178b4
posix_timers: Fix pre-condition to stop the tick on full dynticks
...
The test that checks if a CPU can stop its tick from posix CPU
timers angle was mistakenly inverted.
What we want is to prevent the tick from being stopped as long
as the current CPU's task runs a posix CPU timer.
Fix this.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-22 19:59:25 +02:00
Ingo Molnar
a166fcf04d
Merge branch 'timers/nohz-posix-timers-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into timers/nohz
...
Pull posix cpu timers handling on full dynticks from Frederic Weisbecker.
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-04-21 11:05:47 +02:00
Ingo Molnar
2727872dfe
Merge branch 'timers/nohz-reviewed' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into timers/nohz
...
Pull full dynticks timekeeping and RCU improvements from Frederic Weisbecker.
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-04-21 11:04:42 +02:00
Frederic Weisbecker
555347f6c0
posix_timers: New API to prevent from stopping the tick when timers are running
...
Bring a new helper that the full dynticks infrastructure can
call in order to know if it can safely stop the tick from
the posix cpu timers subsystem point of view.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-19 16:31:40 +02:00
Frederic Weisbecker
a85721601a
posix_timers: Kick full dynticks CPUs when a posix cpu timer is armed
...
Kick the full dynticks CPUs when a posix cpu timer is enqueued by
way of a standard call to posix_cpu_timer_set() or set_process_cpu_timer().
This also include rescheduled firing timers.
This way they can re-evaluate the state of (and possibly restart) their
tick against the new expiry modification.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-19 16:30:13 +02:00
Frederic Weisbecker
f98823ac75
nohz: New option to default all CPUs in full dynticks range
...
Provide a new kernel config that defaults all CPUs to be part
of the full dynticks range, except the boot one for timekeeping.
This default setting is overriden by the nohz_full= boot option
if passed by the user.
This is helpful for those who don't need a finegrained range
of full dynticks CPU and also for automated testing.
Suggested-by: Ingo Molnar <mingo@kernel.org >
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-19 13:54:16 +02:00
Frederic Weisbecker
d1e43fa5f8
nohz: Ensure full dynticks CPUs are RCU nocbs
...
We need full dynticks CPU to also be RCU nocb so
that we don't have to keep the tick to handle RCU
callbacks.
Make sure the range passed to nohz_full= boot
parameter is a subset of rcu_nocbs=
The CPUs that fail to meet this requirement will be
excluded from the nohz_full range. This is checked
early in boot time, before any CPU has the opportunity
to stop its tick.
Suggested-by: Steven Rostedt <rostedt@goodmis.org >
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-19 13:54:04 +02:00
Frederic Weisbecker
0453b435df
nohz: Force boot CPU outside full dynticks range
...
The timekeeping job must be able to run early on boot
because there may be some pre-SMP (and thus pre-initcalls )
components that rely on it. The IO-APIC is one such users
as it tests the timer health by watching jiffies progression.
Given that it happens before we know the initial online
set, we can't rely on it to select a timekeeper. We need
one before SMP time otherwise we simply crash on boot.
To fix this and keep things simple for now, force the boot CPU
outside of the full dynticks range in any case and do this early
on kernel parameter parsing time.
We might want a trickier solution later, expecially for aSMP
architectures that need to assign housekeeping tasks to arbitrary
low power CPUs.
But it's still first pass KISS time for now.
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-19 13:53:14 +02:00
Frederic Weisbecker
76c24fb054
nohz: New APIs to re-evaluate the tick on full dynticks CPUs
...
Provide two new helpers in order to notify the full dynticks CPUs about
some internal system changes against which they may reconsider the state
of their tick. Some practical examples include: posix cpu timers, perf tick
and sched clock tick.
For now the notifying handler, implemented through IPIs, is a stub
that will be implemented when we get the tick stop/restart infrastructure
in.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Chris Metcalf <cmetcalf@tilera.com >
Cc: Christoph Lameter <cl@linux.com >
Cc: Geoff Levand <geoff@infradead.org >
Cc: Gilad Ben Yossef <gilad@benyossef.com >
Cc: Hakan Akkan <hakanakkan@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kevin Hilman <khilman@linaro.org >
Cc: Li Zhong <zhong@linux.vnet.ibm.com >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: Paul Gortmaker <paul.gortmaker@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
2013-04-18 18:53:34 +02:00