STRUCT PADATA_INSTANCE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct padata_instance(9) β€” like, the whole entire control structure, bestie

okay so welcome to the Kernel API Manual ✨ and buckle up, because this page is about struct padata_instance, and it is literally the overall control structure. that's it, that's the whole vibe. she's the main character of padata and everyone else is just living in her orbit πŸͺ


🌸 SYNOPSIS 🌸

here's the whole fit, no edits, no cap:

struct padata_instance {
    struct hlist_node               cpuhp_node;
    struct workqueue_struct         *parallel_wq;
    struct workqueue_struct         *serial_wq;
    struct list_head                pslist;
    struct padata_cpumask           cpumask;
    cpumask_var_t validate_cpumask;
    struct kobject                   kobj;
    struct mutex                     lock;
    u8 flags;
  #define PADATA_INIT     1;
  #define PADATA_RESET    2;
  #define PADATA_INVALID  4;
 };

she's detailed, she's structured, she has range πŸ’– now let's meet the members one by one, like a little meet-the-cast post πŸŽ€


πŸ¦‹ Members πŸ¦‹

  • cpuhp_node β€” the linkage for CPU hotplug callbacks. think of it as her little connection string so the hotplug girlies can find her πŸ”Œ
  • parallel_wq β€” the workqueue used for parallel work. multitasking queen energy πŸ‘‘
  • serial_wq β€” the workqueue used for serial work. one thing at a time, and she does it flawlessly 🧚
  • pslist β€” the list of padata_shell objects attached to this instance. it's giving guest list, and everyone on it is invited 🎟️
  • cpumask β€” user supplied cpumasks for parallel and serial works. yes, both. she does both. icon behaviour 🌈
  • validate_cpumask β€” internal cpumask used to validate cpumask during hotplug. she's the background-check friend who makes sure everything checks out before it walks in the door πŸ™ˆ
  • kobj β€” the padata instance kernel object. her official little badge πŸͺͺ
  • lock β€” the padata instance lock. keep it locked, keep it safe, no chaos allowed πŸ”’
  • flags β€” padata flags. the mood ring of the struct, lowkey πŸ’€

and bestie, the flags come with their own little named defines:

  • #define PADATA_INIT 1;
  • #define PADATA_RESET 2;
  • #define PADATA_INVALID 4;

those are verbatim, so please don't retype them from memory, i'm begging 😭 copy/paste is self care fr fr


✨ SEE ALSO ✨

go read these next, i'm obsessed with how consistent this family is 🫢

  • Kernel file ./include/linux/padata.h
  • struct padata_priv(9)
  • struct padata_list(9)
  • struct padata_serial_queue(9)
  • struct padata_cpumask(9)
  • struct parallel_data(9)
  • struct padata_shell(9)
  • struct padata_mt_job(9)

ngl, the whole crew lives in ./include/linux, and this page is filed under October 2026, so mark your calendar bestie ⭐

okay that's the page!! you ate that, honestly πŸ’…βœ¨ mwah πŸŽ€πŸ’œ

πŸ“¦ where this page comes from