From: Trinabh Gupta <trinabh@linux.vnet.ibm.com>
To: arjan@linux.intel.com, peterz@infradead.org, lenb@kernel.org,
venki@google.com, ak@linux.intel.com, len.brown@intel.com,
khilman@ti.com
Cc: linux-kernel@vger.kernel.org,
linux-pm@lists.linux-foundation.org, linux-sh@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
linux-acpi@vger.kernel.org
Subject: [RFC PATCH V4 0/4] cpuidle: global registration of idle states with
Date: Thu, 28 Apr 2011 16:44:10 +0000 [thread overview]
Message-ID: <20110428163201.4868.6984.stgit@tringupt.in.ibm.com> (raw)
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 applies on 2.6.39-rc5 with Len Brown's pm_idle() cleanup
version 3 (https://lkml.org/lkml/2011/4/2/8) plus the patch
https://lkml.org/lkml/diff/2011/4/25/54/1
Changes from previous version (V3):
1. Compile tested for ARM using the following configs: da8xx_omapl_defconfig,
kirkwood_defconfig, stamp9g20_defconfig, omap2plus_defconfig. Boot tested on
Panda SoC (OMAP4430) but it doesn't really use cpuidle.
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.
Additionally tested the case when C-state tables change on
AC <-> Battery power switch.
4. De-duplicated code in [1/4] and moved common code related to
update of cpuidle statistics to drivers/cpuidle/cpuidle.c
5. Handled the case when acpi_processor_cst_has_changed() is called on x86
on switching power from AC <-> Battery. The implementation is just
a prototype. Please provide suggestions.
Brief description of the patches:
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 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.
Thanks,
-Trinabh
next reply other threads:[~2011-04-28 16:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 16:44 Trinabh Gupta [this message]
2011-04-28 16:44 ` [RFC PATCH V4 1/4] cpuidle: Move dev->last_residency update to driver Trinabh Gupta
2011-04-28 16:44 ` [RFC PATCH V4 2/4] cpuidle: Remove CPUIDLE_FLAG_IGNORE and Trinabh Gupta
2011-04-28 16:44 ` [RFC PATCH V4 3/4] cpuidle: Split cpuidle_state structure and move Trinabh Gupta
2011-04-28 16:45 ` [RFC PATCH V4 4/4] cpuidle: Single/Global registration of idle states Trinabh Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110428163201.4868.6984.stgit@tringupt.in.ibm.com \
--to=trinabh@linux.vnet.ibm.com \
--cc=ak@linux.intel.com \
--cc=arjan@linux.intel.com \
--cc=khilman@ti.com \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-sh@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=venki@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).