]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/sqpoll: do the napi busy poll outside the submission block
authorOlivier Langlois <olivier@trillion01.com>
Mon, 16 Sep 2024 19:17:56 +0000 (15:17 -0400)
committerJens Axboe <axboe@kernel.dk>
Tue, 17 Sep 2024 02:24:37 +0000 (20:24 -0600)
commit53d69bdd5b19bb17602cb224e01aeed730ff3289
treecab61324d7be243317d856b3d804faf2844a1ca8
parent2f6a55e4235f596b7dd9e8a7cf3e07f39ac5e9c2
io_uring/sqpoll: do the napi busy poll outside the submission block

there are many small reasons justifying this change.

1. busy poll must be performed even on rings that have no iopoll and no
   new sqe. It is quite possible that a ring configured for inbound
   traffic with multishot be several hours without receiving new request
   submissions
2. NAPI busy poll does not perform any credential validation
3. If the thread is awaken by task work, processing the task work is
   prioritary over NAPI busy loop. This is why a second loop has been
   created after the io_sq_tw() call instead of doing the busy loop in
   __io_sq_thread() outside its credential acquisition block.

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Link: https://lore.kernel.org/r/de7679adf1249446bd47426db01d82b9603b7224.1726161831.git.olivier@trillion01.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/sqpoll.c