Runtime power saving on Linux - not all CPU use is equal
As the number of people using Linux in mobile situations increases, the need to reduce power consumption also increases. While some of these power savings are obvious (like turning off hardware when it's not being used), others are more subtle. The combination of recent changes to the kernel and some small adjustments to existing code can have a significant effect on your battery life.
Modern processors have a variety of low power modes that can be entered while idle. These "C states" are numbered, currently ranging from C0 (a running CPU) to C4 (a deep runtime sleep state). The problem with these states is that the deeper the sleep, the longer it takes the CPU to wake up. In order to avoid excessive reductions in performance, the kernel must keep track of the processor usage pattern and avoid putting the CPU into a deep sleep mode when it's likely that it'll be needed for more work in the near future.
Traditionally, the kernel has had a fixed timer tick - that is, a fixed number of times a second, the timer will generate an interrupt, wake the kernel and allow processes to be rescheduled. This limits the maximum amount of time the CPU can remain idle, as this timer will fire even when the system is otherwise idle. A tick rate of 1000Hz is desirable for reducing latency, but will also result in the maximum sleep period being 1ms. This is less than ideal.
2.6.21 introduced dynamic tick functionality.
- Login to post comments
- 436 reads

Recent comments
3 hours 41 min ago
1 day 4 hours ago
1 day 15 hours ago
1 day 16 hours ago
1 day 16 hours ago
1 day 18 hours ago
1 day 21 hours ago
2 days 3 hours ago
2 days 3 hours ago
2 days 19 hours ago