wq_adjust_max_active(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… wq_adjust_max_active(9) β€” a Kernel API Manual moment πŸŽ€

okay so bestie, welcome to the Kernel API Manual, section 9 (that's the kernel-functions section, iykyk). today's main character is wq_adjust_max_active, and honestly? she's a tiny little function with one job and she does it. ✨


🌸 NAME 🌸

wq_adjust_max_active β€” update a wq's max_active to the current setting

like literally that's it, that's her whole personality, and we respect it 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

void wq_adjust_max_active (struct workqueue_struct *wq );

no return value, she just does the thing and leaves πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • wq β€” the target workqueue. the one being adjusted. the main character of the operation. you hand her a workqueue and she goes to work on it 🧚

⭐ DESCRIPTION ⭐

okay so here's the whole vibe check, bestie, and it's honestly just two branches β€” a very binary situation:

  • if wq isn't freezing β†’ set wq->max_active to the saved_max_active, and activate inactive work items accordingly. she's back, she's thriving, the inactive items get to come out and play πŸ”₯
  • if wq is freezing β†’ clear wq->max_active to zero. full ice queen mode. nothing runs. πŸ’€

so basically: freezing workqueue = max_active is 0; not freezing = max_active goes back to whatever was saved_max_active, and the inactive work items wake up accordingly. no cap. 🌈


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./kernel/workqueue.c β€” and bestie, the friend group here is huge, so buckle up, we're doing the whole roster:

that's the whole group chat, mwah πŸ’‹


and that's the page, bestie!! πŸ¦‹ this lil icon lives in the ./kernel source tree, and this edition is dated October 2026 β€” go off, kernel docs, periodt. πŸ’–βœ¨

πŸ“¦ where this page comes from