STRUCT PADATA_MT_JOB(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct padata_mt_job(9) β€” Kernel API Manual, but make it make sense

okay bestie, so this is the manual page for struct padata_mt_job(9) and it lives in the Kernel API Manual, and honestly? it's giving "one multithreaded job, but make it a whole personality." let's get into it 🫢


✨ NAME ✨

struct padata_mt_job β€” literally represents one multithreaded job. that's it, that's the whole vibe. one job. many threads. iconic.


🌸 SYNOPSIS 🌸

here's the struct in all its glory, copy-pasted exactly because we do not freestyle kernel code, ever:

struct padata_mt_job {
    void (*thread_fn)(unsigned long start, unsigned long end, void
*arg);
    void *fn_arg;
    unsigned long           start;
    unsigned long           size;
    unsigned long           align;
    unsigned long           min_chunk;
    int max_threads;
    bool numa_aware;
 };

no cap, that's the exact layout. don't touch it. πŸŽ€


πŸ¦‹ MEMBERS πŸ¦‹

okay so every field, and what it actually does, let's go one by one πŸ”₯

  • thread_fn β€” this is the callback. it gets called for each chunk of work that a padata thread does. so yeah, this is where the actual labour happens, main character energy fr fr.
  • fn_arg β€” the thread function argument. it's just the thing you hand to thread_fn. the little messenger bag of data. πŸ“
  • start β€” the start of the job. and bestie, note the caveat: units are job-specific. that means the numbers mean whatever your job says they mean, don't @ me. πŸ™ˆ
  • size β€” size of this node's work. again, units are job-specific, so don't assume it's bytes. it's whatever your job deals in. πŸ’œ
  • align β€” ranges passed to the thread function fall on this boundary, with the possible exceptions of the beginning and end of the job. so like, mostly aligned, but the edges get a pass. noted, respect the exception. ✨
  • min_chunk β€” the minimum chunk size, in job-specific units. this is how the client communicates the minimum amount of work that's appropriate for one worker thread to do at once. so it's the "don't bother spinning up a thread for less than this" number. lowkey important. πŸ’…
  • max_threads β€” max threads to use for the job. and here's the fine print: the actual number may be less depending on task size and minimum chunk size. so it's a ceiling, not a promise. 😭
  • numa_aware β€” distribute jobs to different nodes with CPU in a round robin fashion. round robin, babe. taking turns like civilized nodes. 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

if you're going down the rabbit hole (and you are, i can tell), go look at the kernel file ./include/linux/padata.h and its besties:

  • 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_instance(9)

that's the whole squad. iykyk 🧚


reminder bestie: every number here is in job-specific units, and max_threads is a max, not a guarantee. don't come for me when you get fewer threads than you asked for β€” the manpage warned you πŸ’€

and that's a wrap, mwah πŸ’– this one came from the source at ./include/linux, dated October 2026, and it's filed under struct padata_mt_job(9) in case you need to find it again. slay, go read your kernel headers, periodt. πŸ‘‘βœ¨

πŸ“¦ where this page comes from