workqueue_congested(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

workqueue_congested β€” bestie's lil vibe check for whether a workqueue is congested ✨

(this one lives in the Kernel API Manual, section 9, okurrr)


✨ SYNOPSIS

bool workqueue_congested (int cpu , struct workqueue_struct *wq );

πŸŽ€ ARGUMENTS

  • cpu β€” the CPU in question πŸ‘€ like, which CPU are we checking, bestie
  • wq β€” the target workqueue, the one getting the vibe check πŸ’…

🌸 DESCRIPTION

Okay so, short version: this function tests whether wq's cpu workqueue for cpu is congested. That's it. That's the whole thing. πŸ¦‹

🫢 Important caveat, no cap: there is no synchronization around this function, and the test result is unreliable β€” it's only useful as advisory hints or for debugging. So like… do not build your whole main character algorithm on it, bestie. It's giving "just a hint," not "gospel."

If cpu is WORK_CPU_UNBOUND, the test is performed on the local CPU. Cute, convenient, love that for you. ✨

And here's the structural tea β˜•: with the exception of ordered workqueues, all workqueues have per-cpu pool_workqueues, each with its own congested state. So a workqueue being congested on one CPU doesn't mean the workqueue is contested on any other CPUs. Like, one CPU struggling does not mean the group chat is fighting on every platform. Each one got its own drama. 😭


πŸ‘‘ RETURN

true if congested, false otherwise. Simple. Iconic. Periodt. πŸ’–


πŸ”₯ SEE ALSO

Grab a snack, because this is the whole friend group β€” the kernel file ./kernel/workqueue.c plus literally everyone it knows πŸ“:


πŸŒˆπŸ’œ and that's the whole page, bestie! this one comes straight from the ./kernel source and it's dated October 2026 β€” so go forth, run your vibe check, and remember: advisory hints only, mwah πŸ’‹ πŸŽ€

πŸ“¦ where this page comes from