• Pavel Begunkov's avatar
    io_uring: allocate memory for overflowed CQEs · 6c2450ae
    Pavel Begunkov authored
    Instead of using a request itself for overflowed CQE stashing, allocate a
    separate entry. The disadvantage is that the allocation may fail and it
    will be accounted as lost (see rings->cq_overflow), so we lose reliability
    in case of memory pressure if the application is driving the CQ ring into
    overflow. However, it opens a way for for multiple CQEs per an SQE and
    even generating SQE-less CQEs.
    Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
    [axboe: use GFP_ATOMIC | __GFP_ACCOUNT]
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    6c2450ae
io_uring.c 242 KB