Skip to content

Commit

Permalink
io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads
Browse files Browse the repository at this point in the history
Users may specify a CPU where the sqpoll thread would run. This may
conflict with cpuset operations because of strict PF_NO_SETAFFINITY
requirement. That flag is unnecessary for polling "kernel" threads, see
the reasoning in commit 01e68ce ("io_uring/io-wq: stop setting
PF_NO_SETAFFINITY on io-wq workers"). Drop the flag on poll threads too.

Fixes: 01e68ce ("io_uring/io-wq: stop setting PF_NO_SETAFFINITY on io-wq workers")
Link: https://lore.kernel.org/all/20230314162559.pnyxdllzgw7jozgx@blackpad/
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Link: https://lore.kernel.org/r/20230314183332.25834-1-mkoutny@suse.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Michal Koutný authored and Jens Axboe committed Mar 15, 2023
1 parent fa78033 commit a5fc144
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion io_uring/sqpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ static int io_sq_thread(void *data)
set_cpus_allowed_ptr(current, cpumask_of(sqd->sq_cpu));
else
set_cpus_allowed_ptr(current, cpu_online_mask);
current->flags |= PF_NO_SETAFFINITY;

mutex_lock(&sqd->lock);
while (1) {
Expand Down

0 comments on commit a5fc144

Please sign in to comment.