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

From: Chris Wright
Date: Sat Mar 31 2007 - 04:34:55 EST


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@xxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: john stultz <johnstul@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
---
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();

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/