Hasty Briefsbeta

Bilingual

Idle CPU power management: cpuidle

11 hours ago
  • #Linux Kernel
  • #Embedded Systems
  • #Power Management
  • The idle loop evolved from simple infinite loops to complex cpuidle system managing power through idle state transitions.
  • cpuidle uses drivers for hardware-specific idle state entry/exit and governors to choose optimal idle states based on energy and time costs.
  • Target residency defines minimum idle time for energy savings; governors use history and timer interrupts to predict wake-up times.
  • Menu governor predicts sleep time using next wake-up and history, while teo governor quantizes data to select idle states directly.
  • Tickless kernels (CONFIG_NO_HZ_IDLE/FULL) reduce scheduler ticks for longer idle periods, improving deep idle state effectiveness.
  • PM QoS allows drivers/userspace to set latency tolerance, preventing deep idle states when latency constraints are tight.
  • Tuning involves selecting cpuidle governors (menu vs. teo), adjusting CONFIG_HZ, and eliminating unnecessary polling to optimize power.