workqueue_s...ound_cpumask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… workqueue_set_unbound_cpumask(9) β€” like, the Kernel API Manual, section 9, bestie ✨

okay so real talk, this is a page from the Kernel API Manual (that's the (9) vibe, dev-kernel-core, we're in the big leagues) and honestly? it's a tiny function with a very big mood. it decides which CPUs your unbound workqueues are even allowed to look at. main character energy fr fr πŸ‘‘


πŸŽ€ NAME πŸŽ€

workqueue_set_unbound_cpumask β€” sets the low-level unbound cpumask. that's it. that's the whole job. and it eats. πŸ’…


✨ SYNOPSIS ✨

int workqueue_set_unbound_cpumask (cpumask_var_t cpumask );

just one argument, no drama, we love a single-parameter icon 🫢


🌸 ARGUMENTS 🌸

  • cpumask β€” the cpumask you wanna set. like, the whole point. the moment. the assignment. you hand it a cpumask_var_t and it goes to work πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

okay so lowkey hear me out: the low-level workqueues cpumask is a global cpumask, right? and what it does is it limits the affinity of all unbound workqueues. every single one. it's giving "one mask to rule them all" 😭

so workqueue_set_unbound_cpumask checks the cpumask you gave it (yes it's doing a vibe check first, slay), and then applies it to all unbound workqueues, and also updates all pwqs of them. all of them. no cap. every pwq out here getting a makeover ✨

ngl this is global-scope behaviour so like… be sure you actually mean it before you call it πŸ’€

πŸ”₯ RETURN πŸ”₯

bestie it returns an int, and here's the whole menu:

  • 0 β€” Success πŸ’š (we love a win)
  • -EINVAL β€” Invalid cpumask πŸ™ˆ (your mask did not pass the vibe check)
  • -ENOMEM β€” Failed to allocate memory for attrs or pwqs 😭 (out here trying to allocate and the system said no bestie)

🌈 SEE ALSO 🌈

kay so this is the part where the page just spills the entire workqueue extended universe at you, and honestly? iconic. the kernel file to go read is ./kernel/workqueue.c, and then literally all of these:

like… that's the whole friend group 😭 go read them, iykyk 🧚


πŸ“ anyway bestie that's the page! source is ./kernel and this drop is dated October 2026 β€” so yeah, mark your calendar, screenshot it, frame it, whatever πŸ’œ happy masking! πŸŽ€βœ¨
πŸ“¦ where this page comes from