acrn-kernel/io_uring
Jens Axboe c7920f9928 io_uring: gate iowait schedule on having pending requests
Commit 7b72d661f1 upstream.

A previous commit made all cqring waits marked as iowait, as a way to
improve performance for short schedules with pending IO. However, for
use cases that have a special reaper thread that does nothing but
wait on events on the ring, this causes a cosmetic issue where we
know have one core marked as being "busy" with 100% iowait.

While this isn't a grave issue, it is confusing to users. Rather than
always mark us as being in iowait, gate setting of current->in_iowait
to 1 by whether or not the waiting task has pending requests.

Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/io-uring/CAMEGJJ2RxopfNQ7GNLhr7X9=bHXKo+G5OOe0LUq=+UgLXsv1Xg@mail.gmail.com/
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217699
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217700
Reported-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Reported-by: Phil Elwell <phil@raspberrypi.com>
Tested-by: Andres Freund <andres@anarazel.de>
Fixes: 8a796565ce ("io_uring: Use io_schedule* in cqring wait")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 12:08:08 +02:00
..
Makefile
advise.c
advise.h
alloc_cache.h io_uring: fix poll/netmsg alloc caches 2023-04-06 12:10:52 +02:00
cancel.c
cancel.h
epoll.c io_uring: undeprecate epoll_ctl support 2023-06-09 10:34:23 +02:00
epoll.h
fdinfo.c
fdinfo.h
filetable.c io_uring/rsrc: fix null-ptr-deref in io_file_bitmap_get() 2023-03-30 12:49:25 +02:00
filetable.h
fs.c
fs.h
io-wq.c
io-wq.h
io_uring.c io_uring: gate iowait schedule on having pending requests 2023-08-11 12:08:08 +02:00
io_uring.h
kbuf.c io_uring: fix memory leak when removing provided buffers 2023-04-13 16:55:31 +02:00
kbuf.h
msg_ring.c
msg_ring.h
net.c io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr 2023-06-28 11:12:33 +02:00
net.h
nop.c
nop.h
notif.c
notif.h
opdef.c
opdef.h
openclose.c
openclose.h
poll.c io_uring/poll: serialize poll linked timer start with poll removal 2023-06-28 11:12:27 +02:00
poll.h
refs.h
rsrc.c io_uring/rsrc: use nospec'ed indexes 2023-05-11 23:03:24 +09:00
rsrc.h io_uring/rsrc: fix rogue rsrc node grabbing 2023-04-06 12:10:51 +02:00
rw.c
rw.h
slist.h
splice.c
splice.h
sqpoll.c io_uring: unlock sqd->lock before sq thread release CPU 2023-06-21 16:00:53 +02:00
sqpoll.h
statx.c
statx.h
sync.c
sync.h
tctx.c
tctx.h
timeout.c
timeout.h
uring_cmd.c block/io_uring: pass in issue_flags for uring_cmd task_work handling 2023-04-06 12:10:51 +02:00
uring_cmd.h
xattr.c
xattr.h