From: Paul M. <le...@li...> - 2007-05-10 05:15:57
|
On Thu, May 10, 2007 at 02:02:15PM +0900, Hideo Saito wrote: > I hope to place the code looking at whether needs to reschedule in the > same function as follows. > > --- arch/sh/kernel/process.c.org Thu Apr 26 12:08:32 2007 > +++ arch/sh/kernel/process.c Thu May 10 13:05:44 2007 > + if (pm_idle) { > + while (!need_resched()) > + pm_idle(); > + } else if (hlt_counter) { > + while (!need_resched()) > + cpu_relax(); > + } else { > + clear_thread_flag(TIF_POLLING_NRFLAG); > + smp_mb__after_clear_bit(); > + set_bl_bit(); > + while (!need_resched()) > + cpu_sleep(); > + clear_bl_bit(); > + set_thread_flag(TIF_POLLING_NRFLAG); > + } > + No, consider the use case where a platform implements pm_idle() and depends on certain conditions to be met to determine what sort of power-save state can be entered. It's still necessary to have the logic in default_idle() and to have that exported so it can be called back in to from pm_idle(), should the latter not have any meaningful work it can do at the time. In any event, if the previous patches fixes the problems you've been seeing, I'll queue it up. It works fine with dynamic ticks on SH7785 at least (both with and without hlt).. |