Skip to content

kernel: Standardize task comm setup for kthreads

Mike Christie lkml llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5kernel: Move kernel_clone_args's fn to new structarch/alpha/kernel/process.c arch/arc/kernel/process.c arch/arm/kernel/process.c +26 more+99 -681 reply
2/5kernel: Add kernel_clone_fns function to setup taskinclude/linux/sched.h include/linux/sched/task.h kernel/fork.c+9 -00 replies
3/5io_uring: Convert to use setup_thread_fn calloutio_uring/io-wq.c io_uring/sqpoll.c+16 -80 replies
4/5kernel: Prepare set_kthread_struct to be used for setup_thread_fninclude/linux/kthread.h kernel/fork.c kernel/kthread.c +1 more+64 -313 replies
5/5kernel: Convert kthread to use setup_thread_fnkernel/fork.c kernel/kthread.c+2 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] kernel: Standardize task comm setup for kthreads

The following patches were made over Linus's tree. They standardize the task->comm initialization. Currently, kthreads will set it up after a successful kthread_thread call in the calling function. io_uring will set it from the thread fn. And the vhost task patches added it's own helper.

This patchset adds a new kernel clone args callout, setup_thread_fn, which can be used to setup an internal struct, like is needed by kthreads, and can also be used to set the task->comm like is needed by kthread, io_uring and vhost.

Note that I have not yet compile tested all the archs in the first patch. I was not sure if Linus was going to prefer this patchset's approach to setting the comm or would like to leave it as it is now. So this more of a RFC.