STRUCT CPUIDLE_COUPLED(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct cpuidle_coupled(9) πŸ’…

okay bestie so this is a page from the Kernel API Manual and it's literally all about struct cpuidle_coupled β€” the lil data bundle for a set of cpus that share a coupled idle state. yes it's as iconic as it sounds, no cap 🫢


✨ NAME ✨

struct cpuidle_coupled β€” data for set of cpus that share a coupled idle state

like, that's the whole vibe. a struct. for coupled idle. for the cpu girlies that refuse to nap alone. πŸ¦‹


🌸 SYNOPSIS 🌸

struct cpuidle_coupled {
    cpumask_t coupled_cpus;
    int requested_state[NR_CPUS];
    atomic_t ready_waiting_counts;
    atomic_t abort_barrier;
    int online_count;
    int refcnt;
    int prevent;
 };

okay so it's giving "small struct, big responsibilities" and honestly? we love to see it πŸ’–


πŸŽ€ Members πŸŽ€

here's the breakdown of every single field, and yes i'm doing all of them, because skipping fields is not the move 😀

  • coupled_cpus β€” mask of cpus that are part of the coupled set. the guest list, basically. only these cpus are in the group chat πŸ‘‘
  • requested_state β€” array of requested states for cpus in the coupled set. lowkey each cpu's own personal wishlist, indexed by cpu πŸ“
  • ready_waiting_counts β€” combined count of cpus in ready or waiting loops. one single atomic number doing double duty, and the way that it just holds both counts at once? main character energy fr fr ✨
  • abort_barrier β€” synchronisation point for abort cases. the "okay everyone stop, we're bailing" meeting spot πŸ’€
  • online_count β€” count of cpus that are online. just the headcount of who actually showed up πŸ™ˆ
  • refcnt β€” reference count of cpuidle devices that are using this struct. keep track of your friends, bestie, or you'll free something that's still in use 😭
  • prevent β€” flag to prevent coupled idle while a cpu is hotplugging. literally a "do not disturb" sign while the cpu is coming or going 🚫

πŸ’œ SEE ALSO πŸ’œ

like, that's the whole friend group right there. go read all of them, i'll wait 🧚


and that's the page, bestie! it lives under ./drivers/cpuidle, dated October 2026, and it's filed as struct cpuidle_coupled(9) πŸ’… iykyk β€” now go off and couple some idle states, slay πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from