io_uring: cap SQ submit size for SQPOLL with multiple rings
authorJens Axboe <axboe@kernel.dk>
Tue, 8 Sep 2020 15:11:32 +0000 (09:11 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Sep 2020 16:58:09 +0000 (10:58 -0600)
commitfe863c4ca34f2422283d17d14b25efa72662510d
tree0ae4387e6ac8c090725d441edf4e042f1062e863
parent8f95cf7f28bf2ba3d83612038cca21ede88085fa
io_uring: cap SQ submit size for SQPOLL with multiple rings

In the spirit of fairness, cap the max number of SQ entries we'll submit
for SQPOLL if we have multiple rings. If we don't do that, we could be
submitting tons of entries for one ring, while others are waiting to get
service.

The value of 8 is somewhat arbitrarily chosen as something that allows
a fair bit of batching, without using an excessive time per ring.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c