* [PATCH] io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads
@ 2023-03-14 18:33 Michal Koutný
2023-03-15 12:51 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Michal Koutný @ 2023-03-14 18:33 UTC (permalink / raw)
To: io-uring
Cc: linux-kernel, cgroups, Jens Axboe, Pavel Begunkov, Daniel Dao,
Waiman Long
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 01e68ce08a30 ("io_uring/io-wq: stop setting
PF_NO_SETAFFINITY on io-wq workers"). Drop the flag on poll threads too.
Fixes: 01e68ce08a30 ("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ý <[email protected]>
---
io_uring/sqpoll.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
index 0119d3f1a556..9db4bc1f521a 100644
--- a/io_uring/sqpoll.c
+++ b/io_uring/sqpoll.c
@@ -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) {
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads
2023-03-14 18:33 [PATCH] io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads Michal Koutný
@ 2023-03-15 12:51 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2023-03-15 12:51 UTC (permalink / raw)
To: io-uring, Michal Koutný
Cc: linux-kernel, cgroups, Pavel Begunkov, Daniel Dao, Waiman Long
On Tue, 14 Mar 2023 19:33:32 +0100, Michal Koutný wrote:
> 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 01e68ce08a30 ("io_uring/io-wq: stop setting
> PF_NO_SETAFFINITY on io-wq workers"). Drop the flag on poll threads too.
>
>
> [...]
Applied, thanks!
[1/1] io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads
commit: a5fc1441af7719e93dc7a638a960befb694ade89
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-15 12:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14 18:33 [PATCH] io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads Michal Koutný
2023-03-15 12:51 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox