Re: [PATCH 2/4] cpuidle: define the enter function in the driver structure

2012-07-10 Thread Rajendra Nayak
As the architectures tend to add more cores [1][2], that means more memory consumption. In a very near future, we will have 100 cores in a cpu. Assuming we have 4 C-states, that is 100 * 4 * 8 = 3200 bytes of memory used for a single function. IMHO, the kernel shouldn't assume the user must add mo

Re: [PATCH 2/4] cpuidle: define the enter function in the driver structure

2012-07-10 Thread Daniel Lezcano
On 07/10/2012 10:29 AM, Rajendra Nayak wrote: > Hi Daniel, > > On Friday 06 July 2012 04:28 PM, Daniel Lezcano wrote: >> The main purpose of all these cleanup patches are to move out all >> non-data information from the cpuidle_state structure in order to add a >> new api which could be 'cpuidle_r

Re: [PATCH 2/4] cpuidle: define the enter function in the driver structure

2012-07-10 Thread Rajendra Nayak
Hi Daniel, On Friday 06 July 2012 04:28 PM, Daniel Lezcano wrote: The main purpose of all these cleanup patches are to move out all non-data information from the cpuidle_state structure in order to add a new api which could be 'cpuidle_register_cpu_latency(int cpu, struct cpuidle_latencies laten

Re: [PATCH 2/4] cpuidle: define the enter function in the driver structure

2012-07-06 Thread Rafael J. Wysocki
On Friday, July 06, 2012, Daniel Lezcano wrote: > On 07/05/2012 10:38 PM, Rafael J. Wysocki wrote: > > On Thursday, July 05, 2012, Daniel Lezcano wrote: > >> We have the state index passed as parameter to the 'enter' function. > >> Most of the drivers assign their 'enter' functions several times in

Re: [PATCH 2/4] cpuidle: define the enter function in the driver structure

2012-07-06 Thread Daniel Lezcano
On 07/05/2012 10:38 PM, Rafael J. Wysocki wrote: > On Thursday, July 05, 2012, Daniel Lezcano wrote: >> We have the state index passed as parameter to the 'enter' function. >> Most of the drivers assign their 'enter' functions several times in >> the cpuidle_state structure, as we have the index, w

Re: [PATCH 2/4] cpuidle: define the enter function in the driver structure

2012-07-06 Thread Rafael J. Wysocki
On Thursday, July 05, 2012, Daniel Lezcano wrote: > We have the state index passed as parameter to the 'enter' function. > Most of the drivers assign their 'enter' functions several times in > the cpuidle_state structure, as we have the index, we can delegate > to the driver to handle their own cal

[PATCH 2/4] cpuidle: define the enter function in the driver structure

2012-07-05 Thread Daniel Lezcano
We have the state index passed as parameter to the 'enter' function. Most of the drivers assign their 'enter' functions several times in the cpuidle_state structure, as we have the index, we can delegate to the driver to handle their own callback array. That will have the benefit of removing multi