RE: [PATCH] Kick CPUS that might be sleeping in cpus_idle_wait

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Steven Rostedt <rostedt@...>, LKML <linux-kernel@...>
Cc: Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, Brown, Len <len.brown@...>, Adam Belay <abelay@...>, Peter Zijlstra <a.p.zijlstra@...>, Andi Kleen <ak@...>
Date: Wednesday, January 9, 2008 - 8:12 pm

>-----Original Message-----

I think your RFC patch is the right solution here. As I see it, there is
no race with your RFC patch.
As long as you call a dummy smp_call_function on all CPUs, we should be
OK. We can get rid of cpu_idle_state
and the current wait forever logic altogether with dummy
smp_call_function. And so there wont be any wait forever scenario.

The whole point of cpu_idle_wait() is to make all CPUs come out of idle
loop atleast once.
The caller will use cpu_idle_wait something like this.

// Want to change idle handler
- Switch global idle handler to always present default_idle
- call cpu_idle_wait so that all cpus come out of idle for an instant
and stop using old idle pointer and start using default idle
- Change the idle handler to a new handler
- optional cpu_idle_wait if you want all cpus to start using the new
handler immediately.

May be the below 1s patch is safe bet for .24. But for .25, I would say
we just replace all complicated logic by simple dummy smp_call_function
and remove cpu_idle_state altogether.

Thanks,
Venki

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH] kick sleeping idle CPUS on cpu_idle_wait, Steven Rostedt, (Mon Jan 7, 10:27 pm)
RE: [PATCH] Kick CPUS that might be sleeping in cpus_idle_wait, Pallipadi, Venkatesh, (Wed Jan 9, 8:12 pm)
RE: [PATCH] Kick CPUS that might be sleeping in cpus_idle_wait, Pallipadi, Venkatesh, (Thu Jan 10, 1:31 pm)