[patch 49/76] x86: move out tick_nohz_stop_sched_tick() call from the loop

From: Chris Wright
Date: Fri Mar 21 2008 - 19:11:54 EST


-stable review patch. If anyone has any objections, please let us know.
---------------------

From: Hiroshi Shimamoto <h-shimamoto@xxxxxxxxxxxxx>

[upstream commit: 3d97775a]

Move out tick_nohz_stop_sched_tick() call from the loop in cpu_idle
same as 32-bit version.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@xxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ed Tomlinson <edt@xxxxxx>
Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
arch/x86/kernel/process_64.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -212,14 +212,13 @@ 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);

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)

--
--
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/