On 19-05-31 10:27:54, Ming Lei wrote: > Introduces parameter of 'g_host_tags' for testing hostwide tags. > > Not observe performance drop in the following test: > > 1) no 'host_tags', hw queue depth is 16, and 1 hw queue > modprobe null_blk queue_mode=2 nr_devices=4 shared_tags=1 host_tags=0 submit_queues=1 hw_queue_depth=16 > > 2) 'host_tags', global hw queue depth is 16, and 8 hw queues > modprobe null_blk queue_mode=2 nr_devices=4 shared_tags=1 host_tags=1 submit_queues=8 hw_queue_depth=16 > > 3) fio test command: > > fio --bs=4k --ioengine=libaio --iodepth=16 --filename=/dev/nullb0:/dev/nullb1:/dev/nullb2:/dev/nullb3 --direct=1 --runtime=30 --numjobs=16 --rw=randread --name=test --group_reporting --gtod_reduce=1 > > Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> > --- > drivers/block/null_blk_main.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c > index 447d635c79a2..3c04446f3649 100644 > --- a/drivers/block/null_blk_main.c > +++ b/drivers/block/null_blk_main.c > @@ -91,6 +91,10 @@ static int g_submit_queues = 1; > module_param_named(submit_queues, g_submit_queues, int, 0444); > MODULE_PARM_DESC(submit_queues, "Number of submission queues"); > > +static int g_host_tags = 0; > +module_param_named(host_tags, g_host_tags, int, S_IRUGO); > +MODULE_PARM_DESC(host_tags, "All submission queues share one tags"); > + > static int g_home_node = NUMA_NO_NODE; > module_param_named(home_node, g_home_node, int, 0444); > MODULE_PARM_DESC(home_node, "Home node for the device"); > @@ -1554,6 +1558,8 @@ static int null_init_tag_set(struct nullb *nullb, struct blk_mq_tag_set *set) > set->flags = BLK_MQ_F_SHOULD_MERGE; > if (g_no_sched) > set->flags |= BLK_MQ_F_NO_SCHED; > + if (g_host_tags) > + set->flags |= BLK_MQ_F_HOST_TAGS; Hi Ming, I think it would be great if you can provide documentation update also for the null_blk (Documenation/block/null_blk.txt). Also what Bart has pointed out can be applied, I guess. Otherwise, it looks good to me. Reviewed-by: Minwoo Im <minwoo.im.dev@xxxxxxxxx>