aboutsummaryrefslogtreecommitdiffstats
path: root/zfs_config.h.in
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 /zfs_config.h.in
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 'zfs_config.h.in')
-rw-r--r--zfs_config.h.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/zfs_config.h.in b/zfs_config.h.in
index b14be6504..b90643f46 100644
--- a/zfs_config.h.in
+++ b/zfs_config.h.in
@@ -57,6 +57,21 @@
/* blk_queue_flush() is GPL-only */
#undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY
+/* blk_queue_io_opt() is available */
+#undef HAVE_BLK_QUEUE_IO_OPT
+
+/* blk_queue_max_hw_sectors() is available */
+#undef HAVE_BLK_QUEUE_MAX_HW_SECTORS
+
+/* blk_queue_max_segments() is available */
+#undef HAVE_BLK_QUEUE_MAX_SEGMENTS
+
+/* blk_queue_nonrot() is available */
+#undef HAVE_BLK_QUEUE_NONROT
+
+/* blk_queue_physical_block_size() is available */
+#undef HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE
+
/* blk_requeue_request() is available */
#undef HAVE_BLK_REQUEUE_REQUEST