[PATCH] x86_64: move out tick_nohz_stop_sched_tick() call from the loop

Previous thread: Re: sata_nv does not function in kernel > 2.6.20.21 by Matthew Wilcox on Wednesday, January 9, 2008 - 11:39 pm. (2 messages)

Next thread: Re: Top 10 kernel oopses for the week ending January 5th, 2008 by Neil Brown on Thursday, January 10, 2008 - 12:13 am. (2 messages)
To: <mingo@...>
Cc: <tglx@...>, <hpa@...>, <chrisw@...>, <linux-kernel@...>
Date: Wednesday, January 9, 2008 - 11:44 pm

Hello,

tick_nohz_stop_sched_tick() and tick_nohz_restart_sched_tick()
pair in cpu_idle() is different from 32-bit version.

From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Subject: [PATCH] x86_64: move out tick_nohz_stop_sched_tick() call from the loop

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@ct.jp.nec.com>
---
arch/x86/kernel/process_64.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 93ce4f3..6870208 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -170,14 +170,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)
--
1.5.3.6

--

To: Hiroshi Shimamoto <h-shimamoto@...>
Cc: <tglx@...>, <hpa@...>, <chrisw@...>, <linux-kernel@...>
Date: Thursday, January 10, 2008 - 4:01 am

thanks, applied.

Ingo
--

Previous thread: Re: sata_nv does not function in kernel > 2.6.20.21 by Matthew Wilcox on Wednesday, January 9, 2008 - 11:39 pm. (2 messages)

Next thread: Re: Top 10 kernel oopses for the week ending January 5th, 2008 by Neil Brown on Thursday, January 10, 2008 - 12:13 am. (2 messages)