cpumask_any_housekeeping(9)
π 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_idsif 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms