Translate

Archives

Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)
Image of Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)
Image of Linux Kernel Development (3rd Edition)
Image of Operating System Concepts

Tickless Linux Kernels

Linux now uses a tickless kernel by default. Before the advent of the tickless kernel, idle kernels woke themselves up (interrupted) at a rate of 100 Hz, 250 Hz or 1000 Hz, depending on how they were configured, to look for something to do. When interrupted, the kernel queried the CPU about the processes that it was executing, and used the results for process accounting and load balancing. This is known as the timer tick and the kernel performed this interrupt regardless of CPU power state.

The practical result of this design meant that on systems implementing idle CPU power saving, the timer tick prevented the CPU from remaining idle long enough for the system to benefit from idle CPU power savings. Thus laptops running Linux had suboptimal battery life.

The tickless kernel replaced the old periodic timer interrupts with on-demand interrupts. Thus a CPU stays idle until some external event wakes it up such as when a new task is queued for processing. The result is that a CPU that have entered a lower power state can remain in this state longer leading to lower power consumption. This feature is implemented by driving low res timer wheel (the kernel timer system) processing via special per-CPU high-res timers, which timers are reprogrammed to the next-low-res-timer-expires interval.

The 32-bit Linux kernel became a tickless kernel starting with the 2.6.21 kernel and 64-bit kernels became tickless in 2.6.23. To check if your kernel is tickless, check your kernel configuration file.

# uname -r
3.5.0-generic

# grep NO_HZ /boot/config-3.5.0-generic
CONFIG_NO_HZ=y


By the way, /proc/timer_list has information about the currently configured clocks and timers on the system.

Comments are closed.