Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Nicolas Pitre
On Thu, 30 Jan 2014, Daniel Lezcano wrote: > On 01/30/2014 05:07 PM, Nicolas Pitre wrote: > > On Thu, 30 Jan 2014, Daniel Lezcano wrote: > > > But what I don't get with your comment is the local_irq_enable is done > > > from > > > the cpuidle common framework in 'cpuidle_enter_state' it is not

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Peter Zijlstra
On Thu, Jan 30, 2014 at 06:28:52PM +0100, Daniel Lezcano wrote: > Ok, I think the mess is coming from 'default_idle' which does not re-enable > the local_irq but used from different places like amd_e400_idle and > apm_cpu_idle. > > void default_idle(void) > { > trace_cpu_idle_rcuidle(1,

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Daniel Lezcano
On 01/30/2014 05:07 PM, Nicolas Pitre wrote: On Thu, 30 Jan 2014, Daniel Lezcano wrote: On 01/30/2014 06:28 AM, Nicolas Pitre wrote: On Thu, 30 Jan 2014, Preeti U Murthy wrote: Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: On Wed, 29 Jan 2014, Nicolas Pitre wrote: In order to

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Nicolas Pitre
On Thu, 30 Jan 2014, Daniel Lezcano wrote: > On 01/30/2014 06:28 AM, Nicolas Pitre wrote: > > On Thu, 30 Jan 2014, Preeti U Murthy wrote: > > > > > Hi Nicolas, > > > > > > On 01/30/2014 02:01 AM, Nicolas Pitre wrote: > > > > On Wed, 29 Jan 2014, Nicolas Pitre wrote: > > > > > > > > > In order to

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Daniel Lezcano
On 01/30/2014 06:28 AM, Nicolas Pitre wrote: On Thu, 30 Jan 2014, Preeti U Murthy wrote: Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: On Wed, 29 Jan 2014, Nicolas Pitre wrote: In order to integrate cpuidle with the scheduler, we must have a better proximity in the core code

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Daniel Lezcano
On 01/30/2014 06:28 AM, Nicolas Pitre wrote: On Thu, 30 Jan 2014, Preeti U Murthy wrote: Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: On Wed, 29 Jan 2014, Nicolas Pitre wrote: In order to integrate cpuidle with the scheduler, we must have a better proximity in the core code

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Nicolas Pitre
On Thu, 30 Jan 2014, Daniel Lezcano wrote: On 01/30/2014 06:28 AM, Nicolas Pitre wrote: On Thu, 30 Jan 2014, Preeti U Murthy wrote: Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: On Wed, 29 Jan 2014, Nicolas Pitre wrote: In order to integrate cpuidle with the

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Daniel Lezcano
On 01/30/2014 05:07 PM, Nicolas Pitre wrote: On Thu, 30 Jan 2014, Daniel Lezcano wrote: On 01/30/2014 06:28 AM, Nicolas Pitre wrote: On Thu, 30 Jan 2014, Preeti U Murthy wrote: Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: On Wed, 29 Jan 2014, Nicolas Pitre wrote: In order to

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Peter Zijlstra
On Thu, Jan 30, 2014 at 06:28:52PM +0100, Daniel Lezcano wrote: Ok, I think the mess is coming from 'default_idle' which does not re-enable the local_irq but used from different places like amd_e400_idle and apm_cpu_idle. void default_idle(void) { trace_cpu_idle_rcuidle(1,

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-30 Thread Nicolas Pitre
On Thu, 30 Jan 2014, Daniel Lezcano wrote: On 01/30/2014 05:07 PM, Nicolas Pitre wrote: On Thu, 30 Jan 2014, Daniel Lezcano wrote: But what I don't get with your comment is the local_irq_enable is done from the cpuidle common framework in 'cpuidle_enter_state' it is not done from

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Preeti U Murthy
Hi Nicolas, On 01/30/2014 10:58 AM, Nicolas Pitre wrote: > On Thu, 30 Jan 2014, Preeti U Murthy wrote: > >> Hi Nicolas, >> >> On 01/30/2014 02:01 AM, Nicolas Pitre wrote: >>> On Wed, 29 Jan 2014, Nicolas Pitre wrote: >>> In order to integrate cpuidle with the scheduler, we must have a

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Nicolas Pitre
On Thu, 30 Jan 2014, Preeti U Murthy wrote: > Hi Nicolas, > > On 01/30/2014 02:01 AM, Nicolas Pitre wrote: > > On Wed, 29 Jan 2014, Nicolas Pitre wrote: > > > >> In order to integrate cpuidle with the scheduler, we must have a better > >> proximity in the core code with what cpuidle is doing

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Preeti U Murthy
Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: > On Wed, 29 Jan 2014, Nicolas Pitre wrote: > >> In order to integrate cpuidle with the scheduler, we must have a better >> proximity in the core code with what cpuidle is doing and not delegate >> such interaction to arch code. >> >>

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Nicolas Pitre
On Wed, 29 Jan 2014, Nicolas Pitre wrote: > In order to integrate cpuidle with the scheduler, we must have a better > proximity in the core code with what cpuidle is doing and not delegate > such interaction to arch code. > > Architectures implementing arch_cpu_idle() should simply enter > a

[PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Nicolas Pitre
In order to integrate cpuidle with the scheduler, we must have a better proximity in the core code with what cpuidle is doing and not delegate such interaction to arch code. Architectures implementing arch_cpu_idle() should simply enter a cheap idle mode in the absence of a proper cpuidle driver.

[PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Nicolas Pitre
In order to integrate cpuidle with the scheduler, we must have a better proximity in the core code with what cpuidle is doing and not delegate such interaction to arch code. Architectures implementing arch_cpu_idle() should simply enter a cheap idle mode in the absence of a proper cpuidle driver.

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Nicolas Pitre
On Wed, 29 Jan 2014, Nicolas Pitre wrote: In order to integrate cpuidle with the scheduler, we must have a better proximity in the core code with what cpuidle is doing and not delegate such interaction to arch code. Architectures implementing arch_cpu_idle() should simply enter a cheap

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Preeti U Murthy
Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: On Wed, 29 Jan 2014, Nicolas Pitre wrote: In order to integrate cpuidle with the scheduler, we must have a better proximity in the core code with what cpuidle is doing and not delegate such interaction to arch code. Architectures

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Nicolas Pitre
On Thu, 30 Jan 2014, Preeti U Murthy wrote: Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: On Wed, 29 Jan 2014, Nicolas Pitre wrote: In order to integrate cpuidle with the scheduler, we must have a better proximity in the core code with what cpuidle is doing and not

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Preeti U Murthy
Hi Nicolas, On 01/30/2014 10:58 AM, Nicolas Pitre wrote: On Thu, 30 Jan 2014, Preeti U Murthy wrote: Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: On Wed, 29 Jan 2014, Nicolas Pitre wrote: In order to integrate cpuidle with the scheduler, we must have a better proximity in