The cpuidle subsystem | Linux Today

The cpuidle subsystem

Written By
JC
Jonathan Corbet
May 12, 2010

“Your editor recently had cause to dig around in the cpuidle
subsystem. It never makes sense to let such work go to only a
single purpose when it could be applied toward the creation of a
kernel-page article. So, what follows is a multi-level discussion
of cpuidle, what it’s for, and how it works. Doing nothing, it
turns out, is more complicated than one might think.

“On most systems, the processor is idle much of the time. We
can’t always be running CPU-intensive work like kernel builds,
video transcoding, weather modeling, or yum. When there is nothing
left to do, the processor will go into the idle state to wait until
it is needed again. Once upon a time, on many systems, the “idle
state” was literally a thread running at the lowest possible
priority which would execute an infinite loop until the system
found something better to do. Killing the idle process was a good
way to panic a VAX/VMS machine, which had no clue of how to do
nothing without a task dedicated to that purpose.

“Running a busy-wait loop requires power; contemporary concerns
have led us to the conclusion that expending large amounts of power
toward the accomplishment of nothing is rarely a good idea. So CPU
designers have developed ways for the processor to go into a
lower-power state when there is nothing for it to do. Typically,
when put into this state, the CPU will stop clocks and power down
part or all of its circuitry until the next interrupt arrives. That
results in the production of far more nothing per watt than
busy-waiting.”

Complete Story

JC

Jonathan Corbet

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.