Patch "io_uring: add reschedule point to handle_tw_list()" has been added to the 5.15-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: add reschedule point to handle_tw_list()

to the 5.15-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-add-reschedule-point-to-handle_tw_list.patch
and it can be found in the queue-5.15 subdirectory.

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


>From 4e214e7e01158a87308a17766706159bca472855 Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@xxxxxxxxx>
Date: Mon, 17 Jul 2023 10:27:20 -0600
Subject: io_uring: add reschedule point to handle_tw_list()

From: Jens Axboe <axboe@xxxxxxxxx>

Commit f58680085478dd292435727210122960d38e8014 upstream.

If CONFIG_PREEMPT_NONE is set and the task_work chains are long, we
could be running into issues blocking others for too long. Add a
reschedule check in handle_tw_list(), and flush the ctx if we need to
reschedule.

Cc: stable@xxxxxxxxxxxxxxx # 5.10+
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 io_uring/io_uring.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2217,9 +2217,12 @@ static void tctx_task_work(struct callba
 			}
 			req->io_task_work.func(req, &locked);
 			node = next;
+			if (unlikely(need_resched())) {
+				ctx_flush_and_put(ctx, &locked);
+				ctx = NULL;
+				cond_resched();
+			}
 		} while (node);
-
-		cond_resched();
 	}
 
 	ctx_flush_and_put(ctx, &locked);


Patches currently in stable-queue which might be from axboe@xxxxxxxxx are

queue-5.15/block-increment-diskseq-on-all-media-change-events.patch
queue-5.15/block-change-all-__u32-annotations-to-__be32-in-affs_hardblocks.h.patch
queue-5.15/blk-iocost-use-spin_lock_irqsave-in-adjust_inuse_and.patch
queue-5.15/bcache-fixup-btree_cache_wait-list-damage.patch
queue-5.15/bcache-fix-__bch_btree_node_alloc-to-make-the-failure-behavior-consistent.patch
queue-5.15/io_uring-use-io_schedule-in-cqring-wait.patch
queue-5.15/bcache-remove-unnecessary-null-point-check-in-node-allocations.patch
queue-5.15/block-fix-signed-int-overflow-in-amiga-partition-support.patch
queue-5.15/io_uring-wait-interruptibly-for-request-completions-on-exit.patch
queue-5.15/io_uring-add-reschedule-point-to-handle_tw_list.patch
queue-5.15/block-partition-fix-signedness-issue-for-amiga-partitions.patch
queue-5.15/block-add-overflow-checks-for-amiga-partition-support.patch
queue-5.15/io_uring-ensure-iopoll-locks-around-deferred-work.patch



[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