From: Venki Pallipadi <venkatesh.pallipadi@intel.com>
To: Len Brown <lenb@kernel.org>
Cc: Adam Belay <abelay@novell.com>, Len Brown <len.brown@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Shaohua Li <shaohua.li@intel.com>,
linux-acpi@vger.kernel.org
Subject: [PATCH 8/8] cpuidle: first round of documentation updates
Date: Wed, 6 Jun 2007 13:56:41 -0700 [thread overview]
Message-ID: <20070606205641.GH23906@linux-os.sc.intel.com> (raw)
Documentation changes based on Pavel's feedback.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Index: linux-2.6.22-rc-mm/Documentation/cpuidle/sysfs.txt
===================================================================
--- linux-2.6.22-rc-mm.orig/Documentation/cpuidle/sysfs.txt 2007-06-06 11:33:25.000000000 -0700
+++ linux-2.6.22-rc-mm/Documentation/cpuidle/sysfs.txt 2007-06-06 11:35:37.000000000 -0700
@@ -4,14 +4,22 @@
cpuidle sysfs
-System global cpuidle information are under
+System global cpuidle related information and tunables are under
/sys/devices/system/cpu/cpuidle
The current interfaces in this directory has self-explanatory names:
+* current_driver_ro
+* current_governor_ro
+
+With cpuidle_sysfs_switch boot option (meant for developer testing)
+following objects are visible instead.
* available_drivers
* available_governors
* current_driver
* current_governor
+In this case user can switch the driver, governor at run time by writing
+onto current_driver and current_governor.
+
Per logical CPU specific cpuidle information are under
/sys/devices/system/cpu/cpuX/cpuidle
@@ -19,9 +27,9 @@
Under this percpu directory, there is a directory for each idle state supported
by the driver, which in turn has
-* latency
-* power
-* time
-* usage
+* latency : Latency to exit out of this idle state (in microseconds)
+* power : Power consumed while in this idle state (in milliwatts)
+* time : Total time spent in this idle state (in microseconds)
+* usage : Number of times this state was entered (count)
Index: linux-2.6.22-rc-mm/Documentation/cpuidle/governor.txt
===================================================================
--- linux-2.6.22-rc-mm.orig/Documentation/cpuidle/governor.txt 2007-06-06 11:33:25.000000000 -0700
+++ linux-2.6.22-rc-mm/Documentation/cpuidle/governor.txt 2007-06-06 11:33:34.000000000 -0700
@@ -11,12 +11,16 @@
cpuidle governor is policy routine that decides what idle state to enter at
any given time. cpuidle core uses different callbacks to governor while
handling idle entry.
-* select_state callback where governor can determine next idle state to enter
-* prepare_idle callback is called before entering an idle state
-* scan callback is called after a driver forces redetection of the states
+* select_state() callback where governor can determine next idle state to enter
+* prepare_idle() callback is called before entering an idle state
+* scan() callback is called after a driver forces redetection of the states
More than one governor can be registered at the same time and
-user can switch between drivers using /sysfs interface.
+user can switch between drivers using /sysfs interface (when supported).
+
+More than one governor part is supported for developers to easily experiment
+with different governors. By default, most optimal governor based on your
+kernel configuration and platform will be selected by cpuidle.
Interfaces:
int cpuidle_register_governor(struct cpuidle_governor *gov);
Index: linux-2.6.22-rc-mm/Documentation/cpuidle/core.txt
===================================================================
--- linux-2.6.22-rc-mm.orig/Documentation/cpuidle/core.txt 2007-06-06 11:33:25.000000000 -0700
+++ linux-2.6.22-rc-mm/Documentation/cpuidle/core.txt 2007-06-06 11:33:34.000000000 -0700
@@ -12,6 +12,6 @@
standardized infrastructure to support independent development of
governors and drivers.
-cpuidle resides under /drivers/cpuidle.
+cpuidle resides under drivers/cpuidle.
Index: linux-2.6.22-rc-mm/Documentation/cpuidle/driver.txt
===================================================================
--- linux-2.6.22-rc-mm.orig/Documentation/cpuidle/driver.txt 2007-06-06 11:33:25.000000000 -0700
+++ linux-2.6.22-rc-mm/Documentation/cpuidle/driver.txt 2007-06-06 11:33:34.000000000 -0700
@@ -7,16 +7,21 @@
-cpuidle driver supports capability detection for a particular system. The
-init and exit routines will be called for each online CPU, with a percpu
-cpuidle_driver object and driver should fill in cpuidle_states inside
-cpuidle_driver depending on the CPU capability.
+cpuidle driver hooks into the cpuidle infrastructure and does the
+architecture/platform dependent part of CPU idle states. Driver
+provides the platform idle state detection capability and also
+has mechanisms in place to support actusl entry-exit into a CPU idle state.
+
+cpuidle driver supports capability detection for a platform using the
+init and exit routines. They will be called for each online CPU, with a
+percpu cpuidle_driver object and driver should fill in cpuidle_states
+inside cpuidle_driver depending on the CPU capability.
Driver can handle dynamic state changes (like battery<->AC), by calling
force_redetect interface.
It is possible to have more than one driver registered at the same time and
-user can switch between drivers using /sysfs interface.
+user can switch between drivers using /sysfs interface (when enabled).
Interfaces:
int cpuidle_register_driver(struct cpuidle_driver *drv);
next reply other threads:[~2007-06-06 20:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-06 20:56 Venki Pallipadi [this message]
2007-06-06 21:54 ` [PATCH 8/8] cpuidle: first round of documentation updates Keshavamurthy, Anil S
2007-06-19 15:16 ` Pavel Machek
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=20070606205641.GH23906@linux-os.sc.intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=abelay@novell.com \
--cc=akpm@osdl.org \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shaohua.li@intel.com \
--cc=tglx@linutronix.de \
/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 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.