BSDCan2009 - Final Release
BSDCan 2009
The Technical BSD Conference
Speakers | |
---|---|
Gordon Willem Klok |
Schedule | |
---|---|
Day | Talks - 2 - 2009-05-09 |
Room | MNT 201 |
Start time | 13:30 |
Duration | 01:00 |
Info | |
ID | 131 |
Event type | Lecture |
Track | Hacking |
Language used for presentation | English |
The future of processor power management in OpenBSD
The proceeding two years of OpenBSD development have seen the substantial improvement of power management techniques on the i386 and amd64 platforms. These improvements include better support for various frequency and voltage scaling technologies such as Advanced Micro Devices Powernow! and Intels Enhanced Speedstep technology, the development of a complete AML interpreter and ACPI stack not derived from Intel's ACPICA reference code, and support for power management in multi-processor machines. This talk will explore these developments, the limitations encountered and the future direction of power management in OpenBSD.
OpenBSD utilizes a very simple mechanism for communicating performance targets between user space and the kernel a sysctl mechanism called hw.setperf. The hw.setperf sysctl accepts an integer value of between 0 and 100 representing a percentage of machine performance as a performance target and passes this information to a driver ultimately responsible for implementing the performance target. Users may set performance targets themselves or rely upon the user land daemon apmd to govern the system according to a few simple policies such as cool mode where apmd attempts to keep the system running as cool as possible driven by measurements of system activity as determined from the load average. OpenBSD 4.2 saw the introduction of multiprocessor support for setperf system allowing processor performance management to be performed on all processors while preserving the simplicity of a simple numeric performance target. Subsequent versions of OpenBSD have seen the development of an AML interpreter for implementing ACPI (Advanced Configuration and Power Interface) and supporting code novel in its own right for being one of the few implementations not derived from Intel reference code the addition of support for ACPI has allowed OpenBSD to use power management features on a wider variety of modern hardware. While the simplicity of the hw.setperf mechanism is appreciated with the addition of new power management features has begun to demonstrate the limitations of the mechanism.
While the hw.setperf mechanism has served its purpose it suffers from a number of limitations. Internally the hw.setperf mechanism can only utilize a single power management mechanism at a time and a convoluted priority scheme determines which mechanism is ultimately used at boot time. The addition of multiprocessor support was beneificial but further improvements in processor power scaling technology have introduced the capacity for each cores frequency and voltage to be scaled independently of the others in a system revealing a new limitation of the setperf mechanism. Finally because the governor uses a simple metric like load average to determine system activity power saving opportunities are squandered and sub optimal behaviors are exhibited by systems such as reacting slowly to changes in system activity or by the nature of a user land governor the inability to make better decisions about the ideal performance target for the system.