cpumask_any_housekeeping(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpumask_any_housekeeping(9) β€” like, the Kernel API Manual page bestie πŸŽ€

okay so. picture this: you've got a big ol' pile of CPUs and you need to pick one. but not just any one β€” you're being a little picky about it. that's this function. welcome to the group chat ✨


πŸ¦‹ NAME

cpumask_any_housekeeping β€” choose any CPU in @mask, preferring the ones that aren't marked nohz_full 🫢


🌸 SYNOPSIS

unsigned int cpumask_any_housekeeping (const struct cpumask *mask , int
exclude_cpu );

πŸ“ ARGUMENTS

  • mask β€” the mask you're picking a CPU from. your little CPU buffet πŸ’–
  • exclude_cpu β€” the CPU you're avoiding. not invited to the party, sorry babe πŸ™ˆ

πŸ’œ DESCRIPTION

so it returns a CPU from mask, right? but not exclude_cpu. that one's out. blocked. blocked and reported 🚫

if there are housekeeping CPUs that don't use nohz_full, those are the preferred ones β€” they get picked first, main character energy and all πŸ‘‘

pass RESCTRL_PICK_ANY_CPU if you literally do not care and want to avoid excluding any CPUs at all. zero exclusions. free the CPUs. slay 🌈

πŸ’€ lowkey important warning: when a CPU is excluded, it returns >= nr_cpu_ids if no CPUs are available. so like... check that, bestie. don't just assume you got a real CPU back. that's the vibe check you cannot skip.

πŸ”₯ SEE ALSO

kernel file ./fs/resctrl/internal.h β€” and the whole friend group:

  • struct mon_evt(9)
  • struct mon_data(9)
  • struct rmid_read(9)
  • enum rdtgrp_mode(9)
  • struct mongroup(9)
  • struct rdtgroup(9)
  • struct rftype(9)
  • struct mbm_state(9)

go read them, iykyk 😌


and that's the page!! mwah πŸ’‹ this lil cutie lives at ./fs/resctrl, dated October 2026, and it's cpumask_any_housekeeping(9) forever and ever β€” periodt. πŸ§šπŸ’–

πŸ“¦ where this page comes from