queue_work_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ queue_work_node(9) ✨

okay so bestie, welcome to the queue_work_node(9) page β€” a little slice of the Kernel API Manual πŸ’– pull up a chair, we're talking about NUMA nodes and workqueues and honestly? it's giving main character energy.


🌸 SYNOPSIS 🌸

bool queue_work_node (int node , struct workqueue_struct *wq , struct
work_struct *work );

πŸŽ€ ARGUMENTS πŸŽ€

  • node β€” the NUMA node we're targeting the work for 🎯 like, that's the whole vibe of the call
  • wq β€” the workqueue to use
  • work β€” the work to queue

πŸ’… DESCRIPTION πŸ’…

So what we do here is queue the work to a "random" CPU within a given NUMA node. The basic idea? Provide a way to somehow associate work with a given NUMA node. That's it, that's the dream πŸ¦‹

Real talk though: this function will only make a best effort attempt at getting this onto the right NUMA node. No promises, no cap. If no node is requested, or the requested node is offline, then we just fall back to standard queue_work behavior. Simple as that πŸ™ˆ

Currently the "random" CPU ends up being the first available CPU in the intersection of cpu_online_mask and the cpumask of the node β€” unless we are running on the node. In that case we just use the current CPU. iconic behavior honestly πŸ’«

πŸ”₯ RETURN πŸ”₯

Returns false if the work was already on a queue, and true otherwise. That's the whole vibe check 😌


🌈 SEE ALSO 🌈

Kernel file ./kernel/workqueue.c β€” and literally the entire workqueue extended family, no joke, they all pulled up:


okay that's the whole page bestie, go forth and queue responsibly 🫢

πŸ’– sourced straight from ./kernel, this is the October 2026 edition of queue_work_node(9) β€” mwah, love u, bye πŸ’–

πŸ“¦ where this page comes from