• Jens Axboe's avatar
    io_uring: retry bulk slab allocs as single allocs · fd6fab2c
    Jens Axboe authored
    I've seen cases where bulk alloc fails, since the bulk alloc API
    is all-or-nothing - either we get the number we ask for, or it
    returns 0 as number of entries.
    
    If we fail a batch bulk alloc, retry a "normal" kmem_cache_alloc()
    and just use that instead of failing with -EAGAIN.
    
    While in there, ensure we use GFP_KERNEL. That was an oversight in
    the original code, when we switched away from GFP_ATOMIC.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    fd6fab2c
io_uring.c 68.6 KB