Introduction - Processor Power Management in Windows 7 and Windows Server 2008 R2

Introduction
Saving power in today’s computers is a primary design goal, whether to prolong battery life and manage system thermals in portable computers or to address growing energy consumption in desktop and server systems. The processors in today's computers represent a significant portion of the overall system power budget, while also providing a rich set of power management controls that offer significant power-saving opportunities.
Windows® 7 and Windows Server® 2008 R2 include updated and enhanced support for processor power management (PPM) technologies, including Core Parking, improvements to PPM policy configuration, and cooperative processor performance control with the underlying hardware. This paper provides details about the PPM implementation in Windows 7 and Windows Server 2008 R2 that are useful for system designers, firmware engineers, and test engineers.
This paper is an updated and expanded version of ”Processor Power Management in Windows Vista and Windows Server 2008.” We encourage you to review the Windows Vista® version of this paper for details about how to implement PPM support for Windows Vista and Windows Server 2008.
Note: The remainder of this paper refers to both Windows 7 and Windows Server 2008 R2 collectively as Windows 7.
Processor Power Management Changes in Windows 7
Windows 7 includes the following PPM changes and enhancements:
Each configuration option for PPM has its own independent power policy setting. All PPM power policy settings use the same framework and the same PowerCfg utility interface options for configuration. The grouping of PPM power policy settings into collections of settings and the /ppmperf, /ppmidle, /encode, and /decode PowerCfg options are not supported in Windows 7.
The Windows kernel power manager cooperates with the kernel scheduler to intelligently target work to a subset of all logical processors in the system to help improve energy efficiency. On systems that have processors that include Intel Hyper-Threading Technology, Core Parking also helps improve system performance and responsiveness.
Improved diagnostic utilities
The PowerCfg utility has been enhanced with the /energy option to diagnose common power management problems, including errors in the firmware that describe a computer's PPM capabilities.
Processor Clocking Control (PCC)
PCC enables cooperative processor performance and throttle state management with the underlying platform firmware. PCC helps the platform enable the underlying power management features, such as fan speed control, while the processor remains within a range of performance states. PPC is supported only on Windows Server 2008 R2.
Intelligent Timer Tick Distribution (ITTD)
ITTD helps to extend the amount of time that processor cores remain in the idle state by not interrupting all cores in the system when the periodic timer interrupt is delivered. Only the base service processor (BSP) receives every timer tick interrupt, which it optionally delivers to secondary processor cores. When ITTD is combined with Core Parking, it helps systems that have Hyper-V installed realize reduced interrupt traffic and longer idle periods.
The default PPM policies in Windows 7 have been updated to improve energy efficiency and to balance system performance with power savings. When a computer is running on battery power, the High Performance power plan uses multiple processor performance states. Similarly, the Power Saver plan uses multiple processor performance states and is no longer capped at the lowest supported performance state. These improvements help balance the power savings with overall system performance.
Windows 7 Processor Power Management Functional Overview
This section provides an overview of the implementation of the PPM functionality and policy control for Windows 7.
Fundamental Components
The responsibility for PPM is divided between the platform firmware and components of the operating system as follows:
System firmware (ACPI BIOS)
Windows kernel power manager
Windows processor drivers
Figure 0 shows each of these components. Each component is described in more detail in the following sections.
Figure 1. Windows 7 PPM components
System Firmware (BIOS)
The system firmware is responsible for including the ACPI BIOS tables that contain the ACPI processor objects that describe the system's PPM capabilities and controls. The ACPI BIOS tables can also contain optional ACPI processor objects that describe multiprocessor domain dependencies or support for cooperative performance state management (PCC). The system firmware can dynamically update the PPM capabilities based on certain system events, such as AC/DC power source transitions.
Details about the required and optional ACPI processor objects for Windows 7 are provided in the “Implementing Processor Power Management for Windows 7” section later in this paper.
Windows Kernel Power Manager
The Windows kernel power manager is responsible for:
Managing and applying processor power policy.
Calculating the required processor power state transitions.
Applying any constraints due to thermal conditions.
Processor power policy is owned and managed by the Windows kernel power manager. The power manager is responsible for choosing the correct processor state (the “target” state) based on CPU usage and other factors, depending on the PPM technology that is involved. The power manager then directs the appropriate processor state transition through a direct-call interface to the processor driver. The processor driver is responsible for invoking the actual state transition mechanism on the processor or other platform hardware as required.
Processor Drivers
Processor drivers in Windows are used to abstract the specific differences of processor designs from various processor vendors from the operating system. For example, processor drivers might contain processor-specific routines to determine the presence of PPM capabilities and might use a model-specific register (MSR) to invoke PPM state transitions directly on a processor.
Processor drivers in Windows are responsible for:
Enumerating the PPM capabilities of the system.
Validating that the PPM capabilities are described correctly and that they are present in system hardware.
Passing the supported PPM capabilities to the kernel power manager.
Invoking processor power state transitions on the appropriate hardware as directed by the kernel power manager.
Loading the Correct Processor Driver
Processor objects are described in the ACPI namespace and are enumerated by the Windows ACPI interpreter. Windows uses the information that is obtained from the CPUID instruction to generate the correct hardware device ID during processor enumeration. This enables the system to load the correct processor driver for the processors that are installed in the system. If a specific match is not found, the generic processor driver, Processr.sys, is used. The specific processors that Windows supports can be seen by examining the Cpu.inf file that is located in the %SYSTEMDRIVE%\Windows\Inf directory of a Windows installation.
|