Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ublk: cache-align struct ublk_io

struct ublk_io is already 56 bytes on 64-bit architectures, so round it
up to a full cache line (typically 64 bytes). This ensures a single
ublk_io doesn't span multiple cache lines and prevents false sharing if
consecutive ublk_io's are accessed by different daemon tasks.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250620151008.3976463-15-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Caleb Sander Mateos and committed by
Jens Axboe
857f4318 c9d066eb

+1 -1
+1 -1
drivers/block/ublk_drv.c
··· 188 188 /* auto-registered buffer, valid if UBLK_IO_FLAG_AUTO_BUF_REG is set */ 189 189 u16 buf_index; 190 190 void *buf_ctx_handle; 191 - }; 191 + } ____cacheline_aligned_in_smp; 192 192 193 193 struct ublk_queue { 194 194 int q_id;