]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3cb7f8f3a901bddb069fe283aa3d77868a4bc198
tree34005d63a26e5f6f09b9ecc581a7502f3be6e2e8
parenta5189781548df3245ce415fd9a096f84f1712bd9
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