All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH V6 0/4] cpuidle: Global registration of idle states with per-cpu statistics
@ 2011-09-22  8:28 ` Deepthi Dharwar
  0 siblings, 0 replies; 28+ messages in thread
From: Deepthi Dharwar @ 2011-09-22  8:28 UTC (permalink / raw)
  To: khilman, venki, ak, len.brown, peterz, santosh.shilimkar, arjan, lenb
  Cc: linux-sh, linux-kernel, linux-acpi, linux-pm, linux-omap,
	linux-arm-kernel

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.

This patch series had been in discussion earlier and
following are the links to the previous discussions.

v1 --> https://lkml.org/lkml/2011/3/22/161
v2 --> https://lkml.org/lkml/2011/1/13/98
v3 --> https://lkml.org/lkml/2011/2/8/73
v4 --> https://lkml.org/lkml/2011/4/28/312
v5 --> https://lkml.org/lkml/2011/6/6/259

Changes from previous version (V5):

    Rebased the series to 3.1-rc7
    
Tests done:

    1. Compile tested for ARM using the following configs: da8xx_omapl_defconfig,
    exynos4_defconfig, kirkwood_defconfig, omap2plus_defconfig, 
    at91rm9200_defconfig
      
    2. Boot tested on x86 nehalem with multiple C-states for both intel_idle
    and acpi_idle drivers.

    3. Boot tested on T60p thinkpad that has T2600 cpu with multiple C-states. 
    Also tested the case when there is dynamic changes in C-states 
    AC <-> Battery Power switch.

Brief description of the patches:

Core change in this series is to split the cpuidle_device structure 
into two parts, i.e  global and per-cpu basis. 

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 cpuidle_states structure and single registration done by one 
cpu. The low level driver is free to set per-cpu driver data on
each cpu if needed using the cpuidle_set_statedata() as the case
today. Only in very rare cases asymmetric C-states exist which can be 
handled within the cpuidle driver. Most architectures do not have 
asymmetric C-states.

First two patches in the series facilitate splitting of cpuidle_states
and cpuidle_device structure and next two patches do the actual split,
change the API's and make existing code follow the changed API.

[1/4] - Move the idle residency accounting part from cpuidle.c to
the respective low level drivers, so that the accounting can
be accurately maintained if the driver decides to demote the
chosen (suggested) by the governor.

[2/4] - removes the cpuidle_device()->prepare API since is is not
widely used and the only use case was to allow software
demotion using CPUIDLE_FLAG_IGNORE flag.  Both these
functions can be absorbed within the cpuidle back-end
driver ad hence deprecating the prepare routine and the
CPUIDLE_FLAG_IGNORE flag.

    - Ref: https://lkml.org/lkml/2011/3/25/52

[3/4] - Splits the usage statistics (read/write) part out of
cpuidle_state structure, so that the states can become read
only and hence made global.

[4/4] - Most APIs will now need to pass pointer to both global
cpuidle_driver and per-cpu cpuidle_device structure.

 arch/arm/mach-at91/cpuidle.c          |   41 +++--
 arch/arm/mach-davinci/cpuidle.c       |   51 ++++---
 arch/arm/mach-exynos4/cpuidle.c       |   30 ++--
 arch/arm/mach-kirkwood/cpuidle.c      |   42 +++---
 arch/arm/mach-omap2/cpuidle34xx.c     |  133 +++++++++++------
 arch/sh/kernel/cpu/shmobile/cpuidle.c |   28 ++--
 drivers/acpi/processor_driver.c       |   20 ---
 drivers/acpi/processor_idle.c         |  251 +++++++++++++++++++++++++++------
 drivers/cpuidle/cpuidle.c             |   86 ++++-------
 drivers/cpuidle/driver.c              |   25 +++
 drivers/cpuidle/governors/ladder.c    |   41 ++++-
 drivers/cpuidle/governors/menu.c      |   29 ++--
 drivers/cpuidle/sysfs.c               |   22 ++-
 drivers/idle/intel_idle.c             |  130 +++++++++++++----
 include/acpi/processor.h              |    1 
 include/linux/cpuidle.h               |   52 ++++---
 16 files changed, 650 insertions(+), 332 deletions(-)


-- 

Thanks
 -Deepthi

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2011-09-23 11:19 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22  8:28 [RFC PATCH V6 0/4] cpuidle: Global registration of idle states with per-cpu statistics Deepthi Dharwar
2011-09-22  8:40 ` [RFC PATCH V6 0/4] cpuidle: Global registration of idle states with Deepthi Dharwar
2011-09-22  8:28 ` [RFC PATCH V6 0/4] cpuidle: Global registration of idle states with per-cpu statistics Deepthi Dharwar
2011-09-22  8:30 ` [RFC PATCH V6 1/4] cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state Deepthi Dharwar
2011-09-22  8:42   ` [RFC PATCH V6 1/4] cpuidle: Move dev->last_residency update to driver Deepthi Dharwar
2011-09-22  8:30   ` [RFC PATCH V6 1/4] cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state Deepthi Dharwar
2011-09-22  8:31 ` [RFC PATCH V6 2/4] cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev->prepare() Deepthi Dharwar
2011-09-22  8:43   ` [RFC PATCH V6 2/4] cpuidle: Remove CPUIDLE_FLAG_IGNORE and Deepthi Dharwar
2011-09-22  8:31   ` [RFC PATCH V6 2/4] cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev->prepare() Deepthi Dharwar
2011-09-22  8:32 ` [RFC PATCH V6 3/4] cpuidle: Split cpuidle_state structure and move per-cpu statistics fields Deepthi Dharwar
2011-09-22  8:44   ` [RFC PATCH V6 3/4] cpuidle: Split cpuidle_state structure and move Deepthi Dharwar
2011-09-22  8:32   ` [RFC PATCH V6 3/4] cpuidle: Split cpuidle_state structure and move per-cpu statistics fields Deepthi Dharwar
2011-09-22  8:34 ` [RFC PATCH V6 4/4] cpuidle: Single/Global registration of idle states Deepthi Dharwar
2011-09-22  8:46   ` Deepthi Dharwar
2011-09-22  8:34   ` Deepthi Dharwar
2011-09-22 17:35 ` [RFC PATCH V6 0/4] cpuidle: Global " Arjan van de Ven
2011-09-22 17:35   ` [RFC PATCH V6 0/4] cpuidle: Global registration of idle states with per-cpu statistics Arjan van de Ven
2011-09-22 17:35   ` Arjan van de Ven
2011-09-22 19:37 ` [RFC PATCH V6 0/4] cpuidle: Global registration of idle states Jean Pihet
2011-09-22 19:37   ` [RFC PATCH V6 0/4] cpuidle: Global registration of idle states with per-cpu statistics Jean Pihet
2011-09-22 19:37   ` Jean Pihet
2011-09-22 19:37   ` Jean Pihet
2011-09-22 19:45 ` Kevin Hilman
2011-09-22 19:45   ` Kevin Hilman
2011-09-22 19:45   ` Kevin Hilman
2011-09-23 11:07   ` Deepthi Dharwar
2011-09-23 11:19     ` [RFC PATCH V6 0/4] cpuidle: Global registration of idle states Deepthi Dharwar
2011-09-23 11:07     ` [RFC PATCH V6 0/4] cpuidle: Global registration of idle states with per-cpu statistics Deepthi Dharwar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.