kernel: provide create_io_thread() helper
authorJens Axboe <axboe@kernel.dk>
Thu, 4 Mar 2021 19:21:05 +0000 (12:21 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Dec 2022 14:09:02 +0000 (07:09 -0700)
commita3db03dc7a4f33de20188638d5b193c2946c5dfe
treeacd67a147cb5de1faf8807d148d3f2b4605a6a43
parent1a9148dfd8e03835dc7617cee696dd18c0000e99
kernel: provide create_io_thread() helper

[ Upstream commit cc440e8738e5c875297ac0e90316745093be7e28 ]

Provide a generic helper for setting up an io_uring worker. Returns a
task_struct so that the caller can do whatever setup is needed, then call
wake_up_new_task() to kick it into gear.

Add a kernel_clone_args member, io_thread, which tells copy_process() to
mark the task with PF_IO_WORKER.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/sched/task.h
kernel/fork.c