sched/rt/nohz: Stop scheduler tick if running realtime task
authorRik van Riel <riel@redhat.com>
Mon, 16 Feb 2015 20:23:49 +0000 (15:23 -0500)
committerIngo Molnar <mingo@kernel.org>
Wed, 18 Feb 2015 17:21:19 +0000 (18:21 +0100)
commit1e78cdbd9b2266503339accafe0ebdd99b93a531
tree20ee0aeed9887bccf703256e60d3fe035c8b3224
parent890a5409f9d0c84d75a1e16eebdfe91d8a57ef1e
sched/rt/nohz: Stop scheduler tick if running realtime task

If the CPU is running a realtime task that does not round-robin
with another realtime task of equal priority, there is no point
in keeping the scheduler tick going. After all, whenever the
scheduler tick runs, the kernel will just decide not to
reschedule.

Extend sched_can_stop_tick() to recognize these situations, and
inform the rest of the kernel that the scheduler tick can be
stopped.

Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: fweisbec@redhat.com
Cc: mtosatti@redhat.com
Link: http://lkml.kernel.org/r/20150216152349.6a8ed824@annuminas.surriel.com
[ Small cleanliness tweak. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c