mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
io_uring: increase max number of reg buffers
Since recent changes instead of storing a large array of struct io_mapped_ubuf, we store pointers to them, that is 4 times slimmer and we should not to so worry about restricting max number of registererd buffer slots, increase the limit 4 times. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/d3dee1da37f46da416aa96a16bf9e5094e10584d.1620990371.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
2d74d0421e
commit
489809e2e2
1 changed files with 3 additions and 1 deletions
|
|
@ -100,6 +100,8 @@
|
||||||
#define IORING_MAX_RESTRICTIONS (IORING_RESTRICTION_LAST + \
|
#define IORING_MAX_RESTRICTIONS (IORING_RESTRICTION_LAST + \
|
||||||
IORING_REGISTER_LAST + IORING_OP_LAST)
|
IORING_REGISTER_LAST + IORING_OP_LAST)
|
||||||
|
|
||||||
|
#define IORING_MAX_REG_BUFFERS (1U << 14)
|
||||||
|
|
||||||
#define SQE_VALID_FLAGS (IOSQE_FIXED_FILE|IOSQE_IO_DRAIN|IOSQE_IO_LINK| \
|
#define SQE_VALID_FLAGS (IOSQE_FIXED_FILE|IOSQE_IO_DRAIN|IOSQE_IO_LINK| \
|
||||||
IOSQE_IO_HARDLINK | IOSQE_ASYNC | \
|
IOSQE_IO_HARDLINK | IOSQE_ASYNC | \
|
||||||
IOSQE_BUFFER_SELECT)
|
IOSQE_BUFFER_SELECT)
|
||||||
|
|
@ -8389,7 +8391,7 @@ static int io_sqe_buffers_register(struct io_ring_ctx *ctx, void __user *arg,
|
||||||
|
|
||||||
if (ctx->user_bufs)
|
if (ctx->user_bufs)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
if (!nr_args || nr_args > UIO_MAXIOV)
|
if (!nr_args || nr_args > IORING_MAX_REG_BUFFERS)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
ret = io_rsrc_node_switch_start(ctx);
|
ret = io_rsrc_node_switch_start(ctx);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue