All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: linux-acpi@vger.kernel.org
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
	Adam Belay <abelay@novell.com>, Shaohua Li <shaohua.li@intel.com>,
	Len Brown <len.brown@intel.com>
Subject: [PATCH 03/22] cpuidle take2: Basic documentation for cpuidle
Date: Fri,  9 Mar 2007 23:00:40 -0500	[thread overview]
Message-ID: <11734992634177-git-send-email-lenb@kernel.org> (raw)
Message-ID: <c5bb38e598e68202e0d6f08b3fe0f30f12999357.1173498651.git.len.brown@intel.com> (raw)
In-Reply-To: <11734992592550-git-send-email-lenb@kernel.org>
In-Reply-To: <941b1971a405f95537bc6f9a738e737eb2186e45.1173498647.git.len.brown@intel.com>

From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Documentation for cpuidle infrastructure

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Adam Belay <abelay@novell.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 Documentation/cpuidle/core.txt     |   17 +++++++++++++++++
 Documentation/cpuidle/driver.txt   |   24 ++++++++++++++++++++++++
 Documentation/cpuidle/governor.txt |   24 ++++++++++++++++++++++++
 Documentation/cpuidle/sysfs.txt    |   27 +++++++++++++++++++++++++++
 4 files changed, 92 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/cpuidle/core.txt
 create mode 100644 Documentation/cpuidle/driver.txt
 create mode 100644 Documentation/cpuidle/governor.txt
 create mode 100644 Documentation/cpuidle/sysfs.txt

diff --git a/Documentation/cpuidle/core.txt b/Documentation/cpuidle/core.txt
new file mode 100644
index 0000000..e686cfc
--- /dev/null
+++ b/Documentation/cpuidle/core.txt
@@ -0,0 +1,17 @@
+
+		Supporting multiple CPU idle levels in kernel
+
+				cpuidle
+
+General Information:
+
+Various CPUs today support multiple idle levels that are differentiated
+by varying exit latencies and power consumption during idle.
+cpuidle is a generic in-kernel infrastructure that separates
+idle policy (governor) from idle mechanism (driver) and provides a
+standardized infrastructure to support independent development of
+governors and drivers.
+
+cpuidle resides under /drivers/cpuidle.
+
+
diff --git a/Documentation/cpuidle/driver.txt b/Documentation/cpuidle/driver.txt
new file mode 100644
index 0000000..2dbee4b
--- /dev/null
+++ b/Documentation/cpuidle/driver.txt
@@ -0,0 +1,24 @@
+
+
+		Supporting multiple CPU idle levels in kernel
+
+				cpuidle drivers
+
+
+
+
+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.
+
+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.
+
+Interfaces:
+int cpuidle_register_driver(struct cpuidle_driver *drv);
+void cpuidle_unregister_driver(struct cpuidle_driver *drv);
+int cpuidle_force_redetect(struct cpuidle_device *dev);
diff --git a/Documentation/cpuidle/governor.txt b/Documentation/cpuidle/governor.txt
new file mode 100644
index 0000000..a0fc3e5
--- /dev/null
+++ b/Documentation/cpuidle/governor.txt
@@ -0,0 +1,24 @@
+
+
+
+		Supporting multiple CPU idle levels in kernel
+
+				cpuidle governors
+
+
+
+
+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
+
+More than one governor can be registered at the same time and
+user can switch between drivers using /sysfs interface.
+
+Interfaces:
+int cpuidle_register_governor(struct cpuidle_governor *gov);
+void cpuidle_unregister_governor(struct cpuidle_governor *gov);
+
diff --git a/Documentation/cpuidle/sysfs.txt b/Documentation/cpuidle/sysfs.txt
new file mode 100644
index 0000000..7fbf644
--- /dev/null
+++ b/Documentation/cpuidle/sysfs.txt
@@ -0,0 +1,27 @@
+
+
+		Supporting multiple CPU idle levels in kernel
+
+				cpuidle sysfs
+
+System global cpuidle information are under
+/sys/devices/system/cpu/cpuidle
+
+The current interfaces in this directory has self-explanatory names:
+* available_drivers
+* available_governors
+* current_driver
+* current_governor
+
+Per logical CPU specific cpuidle information are under
+/sys/devices/system/cpu/cpuX/cpuidle
+for each online cpu X
+
+Under this percpu directory, there is a directory for each idle state supported
+by the driver, which in turn has
+* latency
+* power
+* time
+* usage
+
+
-- 
1.5.0.3.310.g05ef5

  parent reply	other threads:[~2007-03-10  4:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-10  4:00 ACPI patches in test for Linux-2.6.22 Len Brown
2007-03-10  4:00 ` [PATCH 01/22] cpuidle take2: Core cpuidle infrastructure Len Brown
2007-03-10  4:00   ` Len Brown
2007-03-15 12:31     ` Andi Kleen
2007-03-15 16:47       ` Len Brown
2007-03-15 13:13     ` Richard Hughes
2007-03-15 16:38       ` Len Brown
2007-03-15 16:42         ` Richard Hughes
2007-03-10  4:00   ` [PATCH 02/22] cpuidle take2: Hookup ACPI C-states driver with cpuidle Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` Len Brown [this message]
2007-03-10  4:00     ` [PATCH 03/22] cpuidle take2: Basic documentation for cpuidle Len Brown
2007-03-10  4:00   ` [PATCH 04/22] ACPI: battery: make internal names consistent with battery "state" Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 05/22] ACPI: Cache battery status instead of re-evaluating AML Len Brown
2007-03-10  4:00     ` Len Brown
2007-04-19 18:23       ` Andrew Morton
2007-03-10  4:00   ` [PATCH 06/22] ACPI: battery: Lindent Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 07/22] cpuidle: build fix for !CPU_IDLE Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 08/22] cpu_idle: fix build break Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 09/22] cpuidle: make code static Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 10/22] cpuidle: ladder does not depend on ACPI Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 11/22] ACPI: EC: Don't use Global Lock if not asked to do so Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10 14:12     ` Sanjoy Mahajan
2007-03-10  4:00   ` [PATCH 12/22] ACPI: EC: Make EC to initialize first in ACPI Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 13/22] ACPI: EC: "Fake ECDT" workaround is not needed any longer Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 14/22] ACPI: EC: enable burst functionality in EC Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 15/22] ACPI: EC: Remove casts to/from void* from ec.c Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 16/22] ACPI: EC: Put install handlers into separate function Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 17/22] ACPI: EC: Clean ECDT and namespace parsing Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 18/22] ACPI: EC: Rename ec_ecdt to more informative boot_ec Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 19/22] ACPI: EC: first_ec is better to be acpi_ec than acpi_device Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 20/22] ACPI: EC: Cleanup of EC initialization Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-10  4:00   ` [PATCH 21/22] ACPI: EC: Block queries until EC is fully initialized Len Brown
2007-03-10  4:00     ` Len Brown
2007-03-16 17:58 ` ACPI patches in test for Linux-2.6.22 Sergio Monteiro Basto
2007-03-16 18:03   ` Alexey Starikovskiy

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=11734992634177-git-send-email-lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=abelay@novell.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    --cc=venkatesh.pallipadi@intel.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 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.