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>
Thu, 1 Oct 2020 02:32:34 +0000 (20:32 -0600)
commite95eee2dee7862f267a169b10d384c82f71010ce
tree34005d63a26e5f6f09b9ecc581a7502f3be6e2e8
parente8c2bc1fb6c9495b71efe7af476a351ccfba73c4
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