diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-09-15 08:53:45 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-09-15 09:15:22 -0600 |
commit | 9753c642a53bc4fbdef06d372d389dce7d8cddc2 (patch) | |
tree | 7248fe2c5a1787092f7098b242beddddbe300989 /io_uring/rsrc.h | |
parent | 8b0c6025a02ddec2b497f83e7d2f27a07f1d0653 (diff) |
io_uring/rsrc: change ubuf->ubuf_end to length tracking
If we change it to tracking ubuf->start + ubuf->len, then we can reduce
the size of struct io_mapped_ubuf by another 4 bytes, effectively 8
bytes, as a hole is eliminated too.
This shrinks io_mapped_ubuf to 32 bytes.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.h')
-rw-r--r-- | io_uring/rsrc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h index e290d2be3285..8ed588036210 100644 --- a/io_uring/rsrc.h +++ b/io_uring/rsrc.h @@ -42,11 +42,11 @@ struct io_rsrc_node { struct io_mapped_ubuf { u64 ubuf; - u64 ubuf_end; + unsigned int len; unsigned int nr_bvecs; unsigned int folio_shift; - unsigned long acct_pages; refcount_t refs; + unsigned long acct_pages; struct bio_vec bvec[] __counted_by(nr_bvecs); }; |