• Jens Axboe's avatar
    io_uring: add support for IORING_SETUP_CLAMP · 8110c1a6
    Jens Axboe authored
    Some applications like to start small in terms of ring size, and then
    ramp up as needed. This is a bit tricky to do currently, since we don't
    advertise the max ring size.
    
    This adds IORING_SETUP_CLAMP. If set, and the values for SQ or CQ ring
    size exceed what we support, then clamp them at the max values instead
    of returning -EINVAL. Since we return the chosen ring sizes after setup,
    no further changes are needed on the application side. io_uring already
    changes the ring sizes if the application doesn't ask for power-of-two
    sizes, for example.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    8110c1a6
io_uring.c 151 KB