Patch "io_uring/io-wq: inherit cpuset of cgroup in io worker" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    io_uring/io-wq: inherit cpuset of cgroup in io worker

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     io_uring-io-wq-inherit-cpuset-of-cgroup-in-io-worker.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 15e1f8d3bc8f66996195191a723218718ccced12
Author: Felix Moessbauer <felix.moessbauer@xxxxxxxxxxx>
Date:   Tue Sep 10 19:11:57 2024 +0200

    io_uring/io-wq: inherit cpuset of cgroup in io worker
    
    [ Upstream commit 84eacf177faa605853c58e5b1c0d9544b88c16fd ]
    
    The io worker threads are userland threads that just never exit to the
    userland. By that, they are also assigned to a cgroup (the group of the
    creating task).
    
    When creating a new io worker, this worker should inherit the cpuset
    of the cgroup.
    
    Fixes: da64d6db3bd3 ("io_uring: One wqe per wq")
    Signed-off-by: Felix Moessbauer <felix.moessbauer@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240910171157.166423-3-felix.moessbauer@xxxxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c
index e38bbd07563ee..b59a1bf844cf9 100644
--- a/io_uring/io-wq.c
+++ b/io_uring/io-wq.c
@@ -1167,7 +1167,7 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
 
 	if (!alloc_cpumask_var(&wq->cpu_mask, GFP_KERNEL))
 		goto err;
-	cpumask_copy(wq->cpu_mask, cpu_possible_mask);
+	cpuset_cpus_allowed(data->task, wq->cpu_mask);
 	wq->acct[IO_WQ_ACCT_BOUND].max_workers = bounded;
 	wq->acct[IO_WQ_ACCT_UNBOUND].max_workers =
 				task_rlimit(current, RLIMIT_NPROC);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux