Re: [PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Peter Zijlstra
On Mon, Feb 24, 2014 at 08:04:25PM +0100, Daniel Lezcano wrote: > >+/* > >+ * Since we fell out of the loop above, we know > >+ * TIF_NEED_RESCHED must be set, propagate it into > >+ * PREEMPT_NEED_RESCHED. > >+ * > >+ * This i

Re: [PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Daniel Lezcano
On 02/24/2014 06:22 PM, Peter Zijlstra wrote: On Mon, Feb 24, 2014 at 06:03:10PM +0100, Daniel Lezcano wrote: Well there is the polling idle state for the x86 and ppc cpuidle drivers. Except that, I think we have something more or less clean. Yeah, they have to set it back to polling again :/

Re: [PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Peter Zijlstra
On Mon, Feb 24, 2014 at 12:54:52PM -0500, Nicolas Pitre wrote: > On Mon, 24 Feb 2014, Peter Zijlstra wrote: > > > Urgh, looks like something went wrong with: cf37b6b48428d > > > > That commit doesn't actually remove kernel/cpu/idle.c nor is the new > > code an exact replica of the old one. > >

Re: [PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Nicolas Pitre
On Mon, 24 Feb 2014, Peter Zijlstra wrote: > Urgh, looks like something went wrong with: cf37b6b48428d > > That commit doesn't actually remove kernel/cpu/idle.c nor is the new > code an exact replica of the old one. > > Ingo, any chance we can get that fixed? The patch I posted was based on v3

Re: [PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Peter Zijlstra
On Mon, Feb 24, 2014 at 06:03:10PM +0100, Daniel Lezcano wrote: > Well there is the polling idle state for the x86 and ppc cpuidle drivers. > Except that, I think we have something more or less clean. Yeah, they have to set it back to polling again :/ Ideally we'd sweep the entire tree and switch

Re: [PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Daniel Lezcano
On 02/24/2014 05:05 PM, Peter Zijlstra wrote: On Mon, Feb 24, 2014 at 04:39:08PM +0100, Daniel Lezcano wrote: And when you do that; you can also push down the current_clr_polling_and_test() muck so it doesn't cover the actual cpuidle policy code. I am not getting it. Where do you suggest to m

Re: [PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Peter Zijlstra
On Mon, Feb 24, 2014 at 04:39:08PM +0100, Daniel Lezcano wrote: > >And when you do that; you can also push down the > >current_clr_polling_and_test() muck so it doesn't cover the actual > >cpuidle policy code. > > I am not getting it. Where do you suggest to move it ? A little something like so

Re: [PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Daniel Lezcano
On 02/24/2014 03:59 PM, Peter Zijlstra wrote: On Mon, Feb 24, 2014 at 02:55:50PM +0100, Daniel Lezcano wrote: @@ -136,25 +155,8 @@ static void cpu_idle_loop(void) local_irq_disable(); arch_cpu_idle_enter(); - /* -

Re: [PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Peter Zijlstra
On Mon, Feb 24, 2014 at 02:55:50PM +0100, Daniel Lezcano wrote: > @@ -136,25 +155,8 @@ static void cpu_idle_loop(void) > local_irq_disable(); > arch_cpu_idle_enter(); > > - /* > - * In poll mode we reenable inter

[PATCH V2 4/5] idle: Move idle conditions in cpuidle_idle main function

2014-02-24 Thread Daniel Lezcano
This patch moves the condition before entering idle into the cpuidle main function located in idle.c. That simplify the idle mainloop functions and increase the readibility of the conditions to enter truly idle. This patch is code reorganization and does not change the behavior of the function. S