Hi all,
We're planning to develop a memory power management driver for some
platforms which need to add new interface to current OpenSolaris kernel. I have
written a PSARC onepager for the new interfaces, please help to comment on the
interface design. The attachment is information about the memory power
management driver for your reference.
Thanks!
Template Version: @(#)onepager.txt 1.35 07/11/07 SMI
1. Introduction
1.1. Project/Component Working Name:
CPU idle notification interface
1.2. Name of Document Author/Supplier:
Author: Gerry Liu <jiang.liu at intel.com>
1.3. Date of This Document:
October 21, 2008
4. Technical Description:
4.1. Problem
A CPU idle state change notification mechanism is needed to signal
other components which are interesting in the state change events
when CPU enters/leaves idle state. This mechanism could be used by
following components:
A) Memory power saving driver
B) Lazy TLB flush on x86 system
C) CPU power management framework
4.2. Proposal
We propose to add following data structures/interfaces to
OpenSolaris kernel.
4.2.1. CPU idle state change notification callback data structures
typedef int (*cpu_idle_enter_cbfn)(void *arg, int flags,
int cstate);
Callback function prototype for entering idle state notification.
typedef void (*cpu_idle_exit_cbfn)(void *arg, int flags);
Callback function prototype for leaving idle state notification.
typedef struct cpu_idle_callback {
int version;
cpu_idle_enter_cbfn idle_enter;
cpu_idle_exit_cbfn idle_exit;
} cpu_idle_callback_t;
Data structure for CPU idle state change notification callback.
4.2.2. Register CPU idle state change notification callback
int cpu_idle_register_callback(uint_t priority,
cpu_idle_callback_t *callbackp, void *arg);
This interface registers a callback to be called when CPU idle state
changes. All registered callbacks will be called in priority order
from high to low when CPU enters idle state and will be called in
the reverse order when CPU leaves idle state.
4.2.3. Unregister CPU idle callback interface
int cpu_idle_unregister_callback(uint_t priority,
cpu_idle_callback_t *callbackp, void *arg);
This interface deregisters a registered callback.
4.2.4. Notify entering idle state
int cpu_idle_enter(int flags, int cstate, int64_t hints);
This interface signals that a specific CPU is entering idle state.
If it returns non-zero value, CPU should cancel entering idle state.
4.2.5. Signal exiting idle state interface
void cpu_idle_exit(int flags);
This interface signals that a specific CPU has left idle state.
6. Resources and Schedule:
6.4. Steering Committee requested information
6.4.1. Consolidation C-team Name:
ON
6.5. ARC review type: FastTrack
6.6. ARC Exposure: open
Liu Jiang (Gerry)
Senior Software Engineer
OpenSolaris, OTC
Tel: (8610)82611515-1643
iNet: 8758-1643
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FBDIMM Idle Power Enhancement Prototype Disclosure for Community.pdf
Type: application/pdf
Size: 258877 bytes
Desc: FBDIMM Idle Power Enhancement Prototype Disclosure for Community.pdf
URL:
<http://mail.opensolaris.org/pipermail/tesla-dev/attachments/20081112/035d05fc/attachment.pdf>