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.

block: default to QD=1 writes for blk-mq rotational zoned devices

For blk-mq rotational zoned block devices (e.g. SMR HDDs), default to
having zone write plugging limit write operations to a maximum queue
depth of 1 for all zones. This significantly reduce write seek overhead
and improves SMR HDD write throughput.

For remotely connected disks with a very high network latency this
features might not be useful. However, remotely connected zoned devices
are rare at the moment, and we cannot know the round trip latency to
pick a good default for network attached devices. System administrators
can however disable this feature in that case.

For BIO based (non blk-mq) rotational zoned block devices, the device
driver (e.g. a DM target driver) can directly set an appropriate
default.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Damien Le Moal and committed by
Jens Axboe
3d9782f6 1365b690

+8
+8
block/blk-sysfs.c
··· 967 967 blk_mq_debugfs_register(q); 968 968 blk_debugfs_unlock(q, memflags); 969 969 970 + /* 971 + * For blk-mq rotational zoned devices, default to using QD=1 972 + * writes. For non-mq rotational zoned devices, the device driver can 973 + * set an appropriate default. 974 + */ 975 + if (queue_is_mq(q) && blk_queue_rot(q) && blk_queue_is_zoned(q)) 976 + blk_queue_flag_set(QUEUE_FLAG_ZONED_QD1_WRITES, q); 977 + 970 978 ret = disk_register_independent_access_ranges(disk); 971 979 if (ret) 972 980 goto out_debugfs_remove;