aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorEtienne Dechamps <[email protected]>2011-09-05 15:15:45 +0200
committerBrian Behlendorf <[email protected]>2012-02-07 16:23:06 -0800
commit34037afe24e0bff97cf5262f8f1a76f5e0815dc1 (patch)
tree563a33de02991aeade1393ef1c61f4b46d733474 /cmd
parentb18019d2d810585185493c62e9567fa85e51692c (diff)
Improve ZVOL queue behavior.
The Linux block device queue subsystem exposes a number of configurable settings described in Linux block/blk-settings.c. The defaults for these settings are tuned for hard drives, and are not optimized for ZVOLs. Proper configuration of these options would allow upper layers (I/O scheduler) to take better decisions about write merging and ordering. Detailed rationale: - max_hw_sectors is set to unlimited (UINT_MAX). zvol_write() is able to handle writes of any size, so there's no reason to impose a limit. Let the upper layer decide. - max_segments and max_segment_size are set to unlimited. zvol_write() will copy the requests' contents into a dbuf anyway, so the number and size of the segments are irrelevant. Let the upper layer decide. - physical_block_size and io_opt are set to the ZVOL's block size. This has the potential to somewhat alleviate issue #361 for ZVOLs, by warning the upper layers that writes smaller than the volume's block size will be slow. - The NONROT flag is set to indicate this isn't a rotational device. Although the backing zpool might be composed of rotational devices, the resulting ZVOL often doesn't exhibit the same behavior due to the COW mechanisms used by ZFS. Setting this flag will prevent upper layers from making useless decisions (such as reordering writes) based on incorrect assumptions about the behavior of the ZVOL. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Makefile.in5
-rw-r--r--cmd/mount_zfs/Makefile.in5
-rw-r--r--cmd/sas_switch_id/Makefile.in5
-rw-r--r--cmd/zdb/Makefile.in5
-rw-r--r--cmd/zfs/Makefile.in5
-rw-r--r--cmd/zinject/Makefile.in5
-rw-r--r--cmd/zpios/Makefile.in5
-rw-r--r--cmd/zpool/Makefile.in5
-rw-r--r--cmd/zpool_id/Makefile.in5
-rw-r--r--cmd/zpool_layout/Makefile.in5
-rw-r--r--cmd/ztest/Makefile.in5
-rw-r--r--cmd/zvol_id/Makefile.in5
12 files changed, 60 insertions, 0 deletions
diff --git a/cmd/Makefile.in b/cmd/Makefile.in
index ba5360941..a0fdde92c 100644
--- a/cmd/Makefile.in
+++ b/cmd/Makefile.in
@@ -50,6 +50,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/mount_zfs/Makefile.in b/cmd/mount_zfs/Makefile.in
index 94e316004..350c67dd4 100644
--- a/cmd/mount_zfs/Makefile.in
+++ b/cmd/mount_zfs/Makefile.in
@@ -53,6 +53,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/sas_switch_id/Makefile.in b/cmd/sas_switch_id/Makefile.in
index 09826f2c9..94e3a63e6 100644
--- a/cmd/sas_switch_id/Makefile.in
+++ b/cmd/sas_switch_id/Makefile.in
@@ -52,6 +52,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in
index 7dd5dfc5f..fa0b8c762 100644
--- a/cmd/zdb/Makefile.in
+++ b/cmd/zdb/Makefile.in
@@ -53,6 +53,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in
index 54f63c75f..ccf9924bd 100644
--- a/cmd/zfs/Makefile.in
+++ b/cmd/zfs/Makefile.in
@@ -53,6 +53,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in
index 59d67f096..eb3f28d0f 100644
--- a/cmd/zinject/Makefile.in
+++ b/cmd/zinject/Makefile.in
@@ -53,6 +53,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/zpios/Makefile.in b/cmd/zpios/Makefile.in
index f357559f3..c9811af10 100644
--- a/cmd/zpios/Makefile.in
+++ b/cmd/zpios/Makefile.in
@@ -53,6 +53,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in
index cb15fee8e..60a97aa2a 100644
--- a/cmd/zpool/Makefile.in
+++ b/cmd/zpool/Makefile.in
@@ -53,6 +53,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/zpool_id/Makefile.in b/cmd/zpool_id/Makefile.in
index a6277ef81..e53c87c4f 100644
--- a/cmd/zpool_id/Makefile.in
+++ b/cmd/zpool_id/Makefile.in
@@ -52,6 +52,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/zpool_layout/Makefile.in b/cmd/zpool_layout/Makefile.in
index 12f21e51b..20658364b 100644
--- a/cmd/zpool_layout/Makefile.in
+++ b/cmd/zpool_layout/Makefile.in
@@ -52,6 +52,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/ztest/Makefile.in b/cmd/ztest/Makefile.in
index 85fdde032..e95f55cb4 100644
--- a/cmd/ztest/Makefile.in
+++ b/cmd/ztest/Makefile.in
@@ -53,6 +53,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \
diff --git a/cmd/zvol_id/Makefile.in b/cmd/zvol_id/Makefile.in
index 2c22c80dc..39862677f 100644
--- a/cmd/zvol_id/Makefile.in
+++ b/cmd/zvol_id/Makefile.in
@@ -53,6 +53,11 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blk-end-request.m4 \
$(top_srcdir)/config/kernel-blk-fetch-request.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-io-opt.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-hw-sectors.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-max-segments.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-nonrot.m4 \
+ $(top_srcdir)/config/kernel-blk-queue-physical-block-size.m4 \
$(top_srcdir)/config/kernel-blk-requeue-request.m4 \
$(top_srcdir)/config/kernel-blk-rq-bytes.m4 \
$(top_srcdir)/config/kernel-blk-rq-pos.m4 \