summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-03-13 06:26:13 +0300
committerJens Axboe <axboe@kernel.dk>2021-03-13 06:26:13 +0300
commit16efa4fce3b7af17bb45d635c3e89992d721e0f3 (patch)
tree7611be49adeaf3d62ce9f64da952cd82367c4ada /fs/io_uring.c
parent15b2219facadec583c24523eed40fa45865f859f (diff)
downloadlinux-16efa4fce3b7af17bb45d635c3e89992d721e0f3.tar.xz
io_uring: allow IO worker threads to be frozen
With the freezer using the proper signaling to notify us of when it's time to freeze a thread, we can re-enable normal freezer usage for the IO threads. Ensure that SQPOLL, io-wq, and the io-wq manager call try_to_freeze() appropriately, and remove the default setting of PF_NOFREEZE from create_io_thread(). Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index a4bce17af506..05adc4887ef3 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6752,6 +6752,7 @@ static int io_sq_thread(void *data)
up_read(&sqd->rw_lock);
schedule();
+ try_to_freeze();
down_read(&sqd->rw_lock);
list_for_each_entry(ctx, &sqd->ctx_list, sqd_list)
io_ring_clear_wakeup_flag(ctx);