io_uring: allow conditional reschedule for intensive iterators
authorJens Axboe <axboe@kernel.dk>
Fri, 24 Sep 2021 13:12:27 +0000 (07:12 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Sep 2021 16:24:34 +0000 (10:24 -0600)
commit8bab4c09f24ec8d4a7a78ab343620f89d3a24804
treeab8e7448a252e0f935e3c52f8985ea69478b2b7a
parent5b7aa38d86f348847a48f71e9ac7715406de900e
io_uring: allow conditional reschedule for intensive iterators

If we have a lot of threads and rings, the tctx list can get quite big.
This is especially true if we keep creating new threads and rings.
Likewise for the provided buffers list. Be nice and insert a conditional
reschedule point while iterating the nodes for deletion.

Link: https://lore.kernel.org/io-uring/00000000000064b6b405ccb41113@google.com/
Reported-by: syzbot+111d2a03f51f5ae73775@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c