Daniel Thompson, Author at CNX Software - Embedded Systems News

Idle CPU power management: cpuidle

Linux Kernel cpuidle subsystem architecture

Twenty years ago, it was easy for an operating system kernel to go idle: when there were no tasks to run, “the idle loop” would be scheduled. Early idle loops were basically empty infinite loops that did nothing while waiting for the next interrupt to happen. This saved power simply by avoiding running instructions that needed power-hungry components such as the cache or FPU! Over time, changing technology has allowed multiple additional hardware mechanisms to reduce power to be introduced. With these new options available today, the idle loop is responsible for choosing and deploying the “best” way to go idle. As a brief reminder, entering and returning from an idle state has a cost, and that cost can be measured both in time and in energy. Typically, the shallowest idle state is “nearly free” to enter/exit, whilst deeper idle states have increasingly higher costs to enter and exit. If […]