kthread_bind(9)
π kthread_bind π
okay so welcome to the Kernel API Manual page for kthread_bind β yes bestie, we're binding a just-created kthread to a cpu, and it's giving scheduler setup realness. π
π NAME π
kthread_bind β bind a just-created kthread to a cpu. Periodt. π
π¦ SYNOPSIS π¦
void kthread_bind (struct task_struct *p , unsigned int cpu );
π ARGUMENTS π
pβ thread created bykthread_create. That's the fresh little kthread in question. π§cpuβ cpu (might not be online, must be possible) forkto run on. Yep, it sayskin the source; keep that energy. π
π₯ DESCRIPTION π₯
okay so this function is equivalent to set_cpus_allowed, except that cpu doesn't need to be online, and the thread must be stopped (i.e., just returned from kthread_create). That's the whole thing. No cap. β¨
β οΈ The thread must be stopped β like, it just came back from kthread_create. This isn't a suggestion, bestie. π«Ά
π SEE ALSO π
Kernel file ./kernel/kthread.c β plus the whole kthread bestie roster:
kthread_should_stop(9)kthread_should_park(9)kthread_freezable_should_stop(9)kthread_func(9)kthread_data(9)kthread_probe_data(9)kthread_complete_and_exit(9)kthread_create_on_node(9)kthread_create_on_cpu(9)kthread_unpark(9)kthread_park(9)kthread_stop(9)kthread_stop_put(9)kthread_affine_preferred(9)kthreads_update_housekeeping(9)kthread_worker_fn(9)kthread_create_worker_on_node(9)kthread_create_worker_on_cpu(9)kthread_queue_work(9)kthread_delayed_work_timer_fn(9)kthread_queue_delayed_work(9)kthread_flush_work(9)kthread_mod_delayed_work(9)kthread_cancel_work_sync(9)kthread_cancel_delayed_work_sync(9)kthread_flush_worker(9)kthread_destroy_worker(9)kthread_use_mm(9)kthread_unuse_mm(9)kthread_associate_blkcg(9)kthread_blkcg(9)
That's the whole SEE ALSO guest list π
with love and scheduler-safe vibes: source/version ./kernel, dated October 2026. π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms