io_uring: pre-calculate syscall iopolling decision
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 22 Mar 2022 14:07:57 +0000 (14:07 +0000)
committerJens Axboe <axboe@kernel.dk>
Sun, 17 Apr 2022 22:51:24 +0000 (16:51 -0600)
commit4ad4b96ef39c240e5bd7ea5775d0652b02a6c85f
treed119df21238408f6eb06a808998db5408a0283ef
parente8e1169ee3d598392906e04b7181a8cdf50f9d9b
io_uring: pre-calculate syscall iopolling decision

Syscall should only iopoll for events when it's a IOPOLL ring and is not
SQPOLL. Instead of check both flags every time we can save it in ring
flags so it's easier to use. We don't care much about an extra if there,
however it will be inconvenient to copy-paste this chunk with checks in
future patches.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/7fd2f8fc2606305aa06dd8c0ff8f76a66b39c383.1647957378.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c