kick_pool_pick(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– kick_pool_pick(9) β€” Kernel API Manual edition πŸ’–

🌸 NAME 🌸

kick_pool_pick β€” select an idle worker to kick, deferring the wakeup. That's the official one-liner, bestie, and we're keeping it exactly. This page lives in the Kernel API Manual, and honestly it's giving "workqueue girlies explain a very specific lock dance." πŸ’…

✨ SYNOPSIS ✨

bool kick_pool_pick (struct worker_pool *pool , struct task_struct **wakep );

πŸŽ€ ARGUMENTS πŸŽ€

  • pool β€” pool to kick. That's the pool. She's the one getting the kick. πŸ’₯
  • wakep β€” out-param, set to the task to wake after pool->lock is dropped. She's not the task herself; she's where the picked task gets handed back, iykyk. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this is like kick_pool but with a little controlled deferral. For a regular (non-BH) pool, it returns the picked worker's task via wakep instead of waking it, so the caller can issue the wakeup after dropping pool->lock β€” and the reason is that the wakeup takes rq->lock. πŸ‘€

Worker selection, wake_cpu setup and the BH kick still happen under the lock. So yeah: the selection, the wake_cpu setup, and the BH kick are all still doing their thing while the lock is held. The actual wakeup is the part that gets deferred.

It returns whether a worker was selected or kicked. That's the bool, bestie. πŸ”₯

⚠️ Locking tea: Must be called with pool->lock held. Not optional, not a vibe, not "maybe I'll hold it later." Hold the lock. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./kernel/workqueue.c, plus the entire workqueue cinematic universe. Yes, all of these. Do not scroll past the group chat. 🫢


That's the whole page, bestie. Footer check before you go: source/version ./kernel, date October 2026, kick_pool_pick(9) β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from