diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-11-03 16:46:07 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-11-06 21:55:36 +0100 |
commit | 6f94cbc29adacc15007c5a16295052e674099282 (patch) | |
tree | e7cd3fa78367dedba9c456a43e871af6a7250dca /io_uring/rw.c | |
parent | io_uring/rsrc: encode node type and ctx together (diff) | |
download | linux-6f94cbc29adacc15007c5a16295052e674099282.tar.xz linux-6f94cbc29adacc15007c5a16295052e674099282.zip |
io_uring/rsrc: split io_kiocb node type assignments
Currently the io_rsrc_node assignment in io_kiocb is an array of two
pointers, as two nodes may be assigned to a request - one file node,
and one buffer node. However, the buffer node can co-exist with the
provided buffers, as currently it's not supported to use both provided
and registered buffers at the same time.
This crucially brings struct io_kiocb down to 4 cache lines again, as
before it spilled into the 5th cacheline.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rw.c')
-rw-r--r-- | io_uring/rw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c index 1ea6be2ccc90..144730344c0f 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -341,7 +341,8 @@ static int io_prep_rw_fixed(struct io_kiocb *req, const struct io_uring_sqe *sqe node = io_rsrc_node_lookup(&ctx->buf_table, req->buf_index); if (!node) return -EFAULT; - io_req_assign_rsrc_node(req, node); + io_req_assign_rsrc_node(&req->buf_node, node); + req->flags |= REQ_F_BUF_NODE; io = req->async_data; ret = io_import_fixed(ddir, &io->iter, node->buf, rw->addr, rw->len); |