[RFC PATCH V5 3/4] cpuidle: Split cpuidle_state structure and move per-cpu statistics fields

2011-06-06 Thread Trinabh Gupta
-off-by: Trinabh Gupta --- arch/arm/mach-davinci/cpuidle.c |5 ++-- arch/arm/mach-omap2/cpuidle34xx.c | 13 ++ drivers/acpi/processor_idle.c | 25 ++-- drivers/cpuidle/cpuidle.c | 11 + drivers/cpuidle/sysfs.c | 15

[RFC PATCH V5 2/4] cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev->prepare()

2011-06-06 Thread Trinabh Gupta
his mechanism is not required. Also this removes per-cpu flags from cpuidle_state enabling it to be made global. Ref: https://lkml.org/lkml/2011/3/25/52 Signed-off-by: Trinabh Gupta --- drivers/cpuidle/cpuidle.c| 10 -- drivers/cpuidle/governors/menu.c |2 -- include/li

[RFC PATCH V5 4/4] cpuidle: Single/Global registration of idle states

2011-06-06 Thread Trinabh Gupta
solution in this patch. Ref: https://lkml.org/lkml/2011/4/25/83 Signed-off-by: Trinabh Gupta --- arch/arm/mach-at91/cpuidle.c | 31 +++-- arch/arm/mach-davinci/cpuidle.c | 39 --- arch/arm/mach-exynos4/cpuidle.c | 23 ++-- arch/arm/mach-kirkwood/cpuidle.c | 30

[RFC PATCH V5 1/4] cpuidle: Move dev->last_residency update to driver enter routine, remove dev->last_state

2011-06-06 Thread Trinabh Gupta
the time spent there. The generic cpuidle code should simply handle where the counters live in the sysfs namespace, not updating the counters. Reference: https://lkml.org/lkml/2011/3/25/52 Signed-off-by: Trinabh Gupta --- arch/arm/mach-at91/cpuidle.c | 10 +++- arch/arm/mach-davi

[RFC PATCH V5 0/4] cpuidle: global registration of idle states with per-cpu statistics

2011-06-06 Thread Trinabh Gupta
The following patch series implements global registration of cpuidle states, and also has the necessary data structure changes to accommodate the per-cpu writable members of the cpuidle_states structure. Previous version of the series (V4) is at https://lkml.org/lkml/2011/4/28/312 This series appl

[RFC PATCH V4 4/4] cpuidle: Single/Global registration of idle states

2011-04-28 Thread Trinabh Gupta
solution in this patch. Ref: https://lkml.org/lkml/2011/4/25/83 Signed-off-by: Trinabh Gupta --- arch/arm/mach-at91/cpuidle.c | 31 +++-- arch/arm/mach-davinci/cpuidle.c | 39 --- arch/arm/mach-kirkwood/cpuidle.c | 30 +++-- arch/arm/mach-omap2/cpuidle34xx.c | 95

[RFC PATCH V4 3/4] cpuidle: Split cpuidle_state structure and move per-cpu statistics fields

2011-04-28 Thread Trinabh Gupta
-off-by: Trinabh Gupta --- arch/arm/mach-davinci/cpuidle.c |5 ++-- arch/arm/mach-omap2/cpuidle34xx.c | 13 ++ drivers/acpi/processor_idle.c | 25 ++-- drivers/cpuidle/cpuidle.c | 11 + drivers/cpuidle/sysfs.c | 15

[RFC PATCH V4 2/4] cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev->prepare()

2011-04-28 Thread Trinabh Gupta
his mechanism is not required. Also this removes per-cpu flags from cpuidle_state enabling it to be made global. Ref: https://lkml.org/lkml/2011/3/25/52 Signed-off-by: Trinabh Gupta --- drivers/cpuidle/cpuidle.c| 10 -- drivers/cpuidle/governors/menu.c |2 -- include/li

[RFC PATCH V4 1/4] cpuidle: Move dev->last_residency update to driver enter routine, remove dev->last_state

2011-04-28 Thread Trinabh Gupta
the time spent there. The generic cpuidle code should simply handle where the counters live in the sysfs namespace, not updating the counters. Reference: https://lkml.org/lkml/2011/3/25/52 Signed-off-by: Trinabh Gupta --- arch/arm/mach-at91/cpuidle.c | 10 +++- arch/arm/mach-davi

[RFC PATCH V4 0/4] cpuidle: global registration of idle states with per-cpu statistics

2011-04-28 Thread Trinabh Gupta
The following patch series implements global registration of cpuidle states, and also has the necessary data structure changes to accommodate the per-cpu writable members of the cpuidle_states structure. Previous version of the series (V3) is at https://lkml.org/lkml/2011/4/20/23 This series app

Re: [linux-pm] [RFC PATCH V3 4/4] cpuidle: Single/Global registration of idle states

2011-04-25 Thread Trinabh Gupta
[...] - * acpi_processor_setup_cpuidle - prepares and configures CPUIDLE + * acpi_processor_setup_cpuidle_cx - prepares and configures CPUIDLE + * device i.e. per-cpu data + * * @pr: the ACPI processor */ -static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) +static int acpi

Re: [linux-pm] [RFC PATCH V3 4/4] cpuidle: Single/Global registration of idle states

2011-04-20 Thread Trinabh Gupta
On 04/20/2011 11:03 PM, Kevin Hilman wrote: Trinabh Gupta writes: With this patch there is single copy of cpuidle_states structure instead of per-cpu. The statistics needed on per-cpu basis by the governor are kept per-cpu. This simplifies the cpuidle subsystem as state registration is done

Re: [linux-pm] [RFC PATCH V3 1/4] cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state

2011-04-20 Thread Trinabh Gupta
On 04/20/2011 10:57 PM, Kevin Hilman wrote: Trinabh Gupta writes: Cpuidle subsystem only suggests the state to enter and does not guarantee if the suggested state is entered. The actual entered state may be different because of software or hardware demotion. Software demotion is done by the

[RFC PATCH V3 4/4] cpuidle: Single/Global registration of idle states

2011-04-19 Thread Trinabh Gupta
() correctly i.e. ensure unregistration of cpuidle driver since registration is now moved inside acpi_processor_power_init(). Signed-off-by: Trinabh Gupta --- arch/arm/mach-at91/cpuidle.c | 31 + arch/arm/mach-davinci/cpuidle.c | 39 ++- arch/arm/mach-kirkwood

[RFC PATCH V3 3/4] Split cpuidle_state structure and move per-cpu statistics fields

2011-04-19 Thread Trinabh Gupta
-off-by: Trinabh Gupta --- arch/arm/mach-at91/cpuidle.c |4 +-- arch/arm/mach-davinci/cpuidle.c |9 +++--- arch/arm/mach-kirkwood/cpuidle.c |4 +-- arch/arm/mach-omap2/cpuidle34xx.c | 17 ++- arch/sh/kernel/cpu/shmobile/cpuidle.c |4 +-- drivers

[RFC PATCH V3 2/4] cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev->prepare()

2011-04-19 Thread Trinabh Gupta
his mechanism is not required. Also this removes per-cpu flags from cpuidle_state enabling it to be made global. Signed-off-by: Trinabh Gupta --- drivers/cpuidle/cpuidle.c| 10 -- drivers/cpuidle/governors/menu.c |2 -- include/linux/cpuidle.h |3 --- 3 fi

[RFC PATCH V3 1/4] cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state

2011-04-19 Thread Trinabh Gupta
should simply handle where the counters live in the sysfs namespace, not updating the counters. Reference: https://lkml.org/lkml/2011/3/25/52 Signed-off-by: Trinabh Gupta --- arch/arm/mach-at91/cpuidle.c | 14 -- arch/arm/mach-davinci/cpuidle.c | 12 - arch/arm/mach

[RFC PATCH V3 0/4] cpuidle: global registration of idle states with per-cpu statistics

2011-04-19 Thread Trinabh Gupta
The core change in this series is to split the cpuidle_device structure into parts that can be global and parts that has to remain per-cpu. The per-cpu pieces are mostly generic statistics that can be independent of current running driver. As a result of these changes, there is single copy of c