STRUCT TEO_CPU(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct teo_cpu β€” okay bestie, listen πŸ’–

So this is the Kernel API Manual page for struct teo_cpu, and it's literally the CPU data that the TEO cpuidle governor runs on. Like, this struct is the main character of idle-time decision-making, no cap. 🫢


✨ NAME ✨

struct teo_cpu β€” the CPU data used by the TEO cpuidle governor, periodt. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

struct teo_cpu {
    s64 sleep_length_ns;
    struct teo_bin state_bins[CPUIDLE_STATE_MAX];
    unsigned int total;
    unsigned int total_tick;
    unsigned int tick_intercepts;
    unsigned int short_idles;
    bool tick_wakeup;
 };
Heads up, the original literally has that extra space before the closing }; β€” yes we're keeping it, character for character, don't come for me πŸ’…

πŸŽ€ Members πŸŽ€

Okay so these are the fields, and every single one of them matters, so let's go:

  • sleep_length_ns β€” the time till the closest timer event, measured at the moment the selection happens. Basically "how long until something wakes us up", in nanoseconds, iconic. ⏰
  • state_bins β€” the idle state data bins for this CPU. The bins! The little buckets! 🧺
  • total β€” the grand total of the "intercepts" and "hits" metrics across, like, all the bins combined. Big number energy. πŸ”₯
  • total_tick β€” wakeups that came from the scheduler tick. πŸ•°οΈ
  • tick_intercepts β€” the "intercepts" that happened before TICK_NSEC. Catching them early, slay. ✨
  • short_idles β€” wakeups that happened after short idle periods. Short but sweet. πŸ“
  • tick_wakeup β€” set if the last wakeup was caused by the scheduler tick. Just a lil bool doing its job. πŸ’œ

🌈 SEE ALSO 🌈

Kernel file ./drivers/cpuidle/governors/teo.c (yes, that whole thing is part of this line), plus the whole friend group: teo-description(9), struct teo_bin(9), teo_update(9), teo_find_shallower_state(9), teo_select(9), teo_reflect(9), teo_enable_device(9). Go read them, iykyk πŸ“š


Okay that's the whole page!! Mwah πŸ’‹ This one lives in ./drivers/cpuidle/governors, and the version/date vibes are October 2026 β€” so like, future slay. Bye bestie, go read a kernel file πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from