[RFC PATCH 4/5] x86_64: prep idle loop for dynticks

Chris Wright
2007-03-31T08:34:31Z

[-- Attachment #1: x86_64-dyntick-idle-updates.patch --]
[-- Type: text/plain, Size: 1107 bytes --]

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 in next patch.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Andi Kleen <ak@suse.de>
---
arch/x86_64/kernel/process.c | 3 +++
1 file changed, 3 insertions(+)

--- linus-2.6.orig/arch/x86_64/kernel/process.c
+++ linus-2.6/arch/x86_64/kernel/process.c
@@ -36,6 +36,7 @@
#include <linux/random.h>
#include <linux/notifier.h>
#include <linux/kprobes.h>
+#include <linux/tick.h>

#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -201,6 +202,7 @@ void cpu_idle (void)
current_thread_info()->status |= TS_POLLING;
/* endless idle loop with no priority at all */
while (1) {
+ tick_nohz_stop_sched_tick();
while (!need_resched()) {
void (*idle)(void);

@@ -227,6 +229,7 @@ void cpu_idle (void)
__exit_idle();
}

+ tick_nohz_restart_sched_tick();
preempt_enable_no_resched();
schedule();
preempt_disable();

--