diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-12-14 11:08:15 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-12-15 07:34:51 -0700 |
commit | 0c734c5ea76e333fbb8dd83b5bab46291b38096b (patch) | |
tree | 15e821b453c4c775abb27f2715b68eaa27403be2 /block/genhd.c | |
parent | 6ef02df154a245a4a7c0a66daa5a353daa788dba (diff) |
block: improve struct request_queue layout
It's clearly been a while since someone looked at this, so I gave it a
quick shot. There are few issues in here:
- Random bundling of members that are mostly read-only and often written
- Random holes that need not be there
This moves the most frequently used bits into cacheline 1 and 2, with
the 2nd one being more write intensive than the first one, which is
basically read-only.
Outside of making this work a bit more efficiently, it also reduces the
size of struct request_queue for my test setup from 864 bytes (spanning
14 cachelines!) to 832 bytes and 13 cachelines.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/d2b7b61c-4868-45c0-9060-4f9c73de9d7e@kernel.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
0 files changed, 0 insertions, 0 deletions