null_blk: unalign call_single_data
Jens Axboe
maintainerPATCH 1/1 null_blk: unalign call_single_data
Commit 966a967116e6 randomly added alignment to this structure, but it's actually detrimental to performance of null_blk. Test case:
# modprobe null_blk queue_mode=1 irqmode=1 home_node={0,1}
# echo noop > /sys/block/nullb0/queue/scheduler
# fio --name=csd --filename=/dev/nullb0 --numjobs=8 --direct=1 --rw=randread --norandommap --cpus_allowed=$(cat /sys/devices/system/node/node0/cpulist) --group_reporting=1Running on both the home and remote node shows a ~5% degradation in performance.
Fixes 966a967116e69 ("smp: Avoid using two cache lines for struct call_single_data")
Signed-off-by Jens Axboe <[email protected]>
---
drivers/block/null_blk.c +1 -1
@@ -35,7 +35,7 @@ static inline u64 mb_per_tick(int mbps)struct nullb_cmd {struct list_head list;struct llist_node ll_list; -call_single_data_t csd; +struct __call_single_data csd;struct request *rq;struct bio *bio;unsigned int tag;
Signature · 1 line
Jens Axboe