• J
    io_uring: allow application controlled CQ ring size · db71020d
    Jens Axboe 提交于
    commit 33a107f0a1b8df0ad925e39d8afc97bb78e0cec1 upstream.
    
    We currently size the CQ ring as twice the SQ ring, to allow some
    flexibility in not overflowing the CQ ring. This is done because the
    SQE life time is different than that of the IO request itself, the SQE
    is consumed as soon as the kernel has seen the entry.
    
    Certain application don't need a huge SQ ring size, since they just
    submit IO in batches. But they may have a lot of requests pending, and
    hence need a big CQ ring to hold them all. By allowing the application
    to control the CQ ring size multiplier, we can cater to those
    applications more efficiently.
    
    If an application wants to define its own CQ ring size, it must set
    IORING_SETUP_CQSIZE in the setup flags, and fill out
    io_uring_params->cq_entries. The value must be a power of two.
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    Signed-off-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
    Reviewed-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
    db71020d
io_uring.h 3.6 KB