workqueue_init_early(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– workqueue_init_early β€” like, the first first step πŸ’–

Bestie, welcome to the Kernel API Manual (that's the manual name, slay, now you know). This page is about workqueue_init_early(9) and it's genuinely the opening act of the whole workqueue situation. Let's get into it πŸŽ€


✨ NAME ✨

workqueue_init_early β€” early init for workqueue subsystem 🧚

🌸 SYNOPSIS 🌸

void workqueue_init_early (void );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • void β€” no arguments. Zero. None. She takes nothing, she gives everything πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

Okay so listen. Workqueue subsystem initialization is a three-staged whole thing, and workqueue_init_early is literally the first step of the three. First. Main character energy, no cap πŸ‘‘

She gets invoked as soon as the bare basics are up β€” and by bare basics we mean:

  • memory allocation
  • cpumasks
  • idr

That's it. That's the bar. Once those three are alive, this function walks in πŸ’€

What she does with that moment: sets up all the data structures and all the system workqueues, and she makes it so that early boot code is allowed to create workqueues and queue/cancel work items. So the early boot girlies can go ahead and get their stuff queued up.

But here's the important part, and I need you to hear me on this one: actual work item execution starts only after kthreads can be created and scheduled, which happens right before early initcalls.

So like… you can queue, you can cancel, you can create your little workqueues πŸ’– β€” but nothing actually runs until the kthreads exist and can be scheduled. That's the vibe check. Don't expect execution before then, fr fr πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/workqueue.c β€” and then, bestie, the whole extended universe of cross-references. Every single one, in order, no skips, because we don't do that here 🫢


πŸ’€ That's a lot of cross-refs. Read them. All of them. I'm not kidding, iykyk.

🌈 Okay that's the whole page, bestie! Cute little sign-off time: this one lives in the source directory ./kernel, it's dated October 2026, and the page itself is workqueue_init_early(9). Go forth and init early βœ¨πŸ’–πŸŽ€

πŸ“¦ where this page comes from