Skip to content

Commit

Permalink
x86_64: prepare idle loop for dynamic ticks
Browse files Browse the repository at this point in the history
Add tick_nohz_{stop,restart}_sched_tick to idle loop in prepartion for turning
on dynticks.  These are just noops until NO_HZ is enabled.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
  • Loading branch information
Chris Wright authored and Thomas Gleixner committed Oct 12, 2007
1 parent c4d58cb commit 0229068
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <linux/notifier.h>
#include <linux/kprobes.h>
#include <linux/kdebug.h>
#include <linux/tick.h>

#include <asm/uaccess.h>
#include <asm/pgtable.h>
Expand Down Expand Up @@ -208,6 +209,8 @@ void cpu_idle (void)
if (__get_cpu_var(cpu_idle_state))
__get_cpu_var(cpu_idle_state) = 0;

tick_nohz_stop_sched_tick();

rmb();
idle = pm_idle;
if (!idle)
Expand All @@ -228,6 +231,7 @@ void cpu_idle (void)
__exit_idle();
}

tick_nohz_restart_sched_tick();
preempt_enable_no_resched();
schedule();
preempt_disable();
Expand Down

0 comments on commit 0229068

Please sign in to comment.