diff options
| author | Jens Axboe <axboe@kernel.dk> | 2024-11-03 08:46:07 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2024-11-06 13:55:36 -0700 |
| commit | 6f94cbc29adacc15007c5a16295052e674099282 (patch) | |
| tree | e7cd3fa78367dedba9c456a43e871af6a7250dca /io_uring/nop.c | |
| parent | 6af82f7614a2e31e7ef23e5e160697aef31e8edd (diff) | |
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/nop.c')
| -rw-r--r-- | io_uring/nop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/io_uring/nop.c b/io_uring/nop.c index 149dbdc53607..bc22bcc739f3 100644 --- a/io_uring/nop.c +++ b/io_uring/nop.c @@ -67,7 +67,8 @@ int io_nop(struct io_kiocb *req, unsigned int issue_flags) io_ring_submit_lock(ctx, issue_flags); node = io_rsrc_node_lookup(&ctx->buf_table, nop->buffer); if (node) { - io_req_assign_rsrc_node(req, node); + io_req_assign_rsrc_node(&req->buf_node, node); + req->flags |= REQ_F_BUF_NODE; ret = 0; } io_ring_submit_unlock(ctx, issue_flags); |
