Skip to content
Commit fd6fab2c authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring: retry bulk slab allocs as single allocs



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>
parent 8c838788
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment