]> git.proxmox.com Git - mirror_zfs.git/commitdiff
vdev: expose zfs_vdev_def_queue_depth as a module parameter
authorRob N <rob.norris@klarasystems.com>
Thu, 6 Apr 2023 17:31:19 +0000 (03:31 +1000)
committerGitHub <noreply@github.com>
Thu, 6 Apr 2023 17:31:19 +0000 (10:31 -0700)
It was previously available only to FreeBSD.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Sponsored-by: Klara, Inc.
Sponsored-by: Seagate Technology LLC
Closes #14718

man/man4/zfs.4
module/os/freebsd/zfs/sysctl_os.c
module/zfs/vdev_queue.c

index e8e2cfec61e880b043fcdd5a35296ae80cdab34a..566caae7b4e98f278d3eb6c3ade774b2d6a53024 100644 (file)
@@ -1292,6 +1292,11 @@ as fuller devices will tend to be slower than empty devices.
 Also see
 .Sy zio_dva_throttle_enabled .
 .
+.It Sy zfs_vdev_def_queue_depth Ns = Ns Sy 32 Pq uint
+Default queue depth for each vdev IO allocator.
+Higher values allow for better coalescing of sequential writes before sending
+them to the disk, but can increase transaction commit times.
+.
 .It Sy zfs_vdev_failfast_mask Ns = Ns Sy 1 Pq uint
 Defines if the driver should retire on a given error type.
 The following options may be bitwise-ored together:
index eccb91deff4f619c67a752645b73435599c67a97..cc616f33db960124299ac439adbc67c2b63f1858 100644 (file)
@@ -887,14 +887,6 @@ SYSCTL_UINT(_vfs_zfs, OID_AUTO, top_maxinflight,
        " (LEGACY)");
 /* END CSTYLED */
 
-extern uint_t zfs_vdev_def_queue_depth;
-
-/* BEGIN CSTYLED */
-SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, def_queue_depth,
-       CTLFLAG_RWTUN, &zfs_vdev_def_queue_depth, 0,
-       "Default queue depth for each allocator");
-/* END CSTYLED */
-
 /* zio.c */
 
 /* BEGIN CSTYLED */
index ec55674393ce093021ff2549c911a9a49a9001f1..1a75d68abd9e8d48b2c92dd16ca3284d5fd825d6 100644 (file)
@@ -1119,3 +1119,6 @@ ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, nia_delay, UINT, ZMOD_RW,
 
 ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, queue_depth_pct, UINT, ZMOD_RW,
        "Queue depth percentage for each top-level vdev");
+
+ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, def_queue_depth, UINT, ZMOD_RW,
+       "Default queue depth for each allocator");