From e03a056de0baa06f7b38033e56a33a19526b542c Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 19 Nov 2024 23:46:24 +0000 Subject: [PATCH] vfs: Fix runningspace tuning after maxphys was bumped The previous maximum value for the upper watermark was based on the old value of MAXPHYS. Raise it to allow more parallel I/O on large systems. This is still a rather flawed mechanism since it's applied without regard to the number of filesystems or block devices between which this mechanism sits, but we might as well bump the limits at this point, as they haven't been revised in quite a long time. Reviewed by: imp, kib MFC after: 2 weeks Fixes: cd8537910406 ("Make MAXPHYS tunable. Bump MAXPHYS to 1M.") Differential Revision: https://reviews.freebsd.org/D47398 --- sys/kern/vfs_bio.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 62b0567f269a..10ee88328875 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1253,15 +1253,16 @@ bufinit(void) bufspacethresh = lobufspace + (hibufspace - lobufspace) / 2; /* - * Note: The 16 MiB upper limit for hirunningspace was chosen - * arbitrarily and may need further tuning. It corresponds to - * 128 outstanding write IO requests (if IO size is 128 KiB), - * which fits with many RAID controllers' tagged queuing limits. + * Note: The upper limit for hirunningspace was chosen arbitrarily and + * may need further tuning. It corresponds to 128 outstanding write IO + * requests, which fits with many RAID controllers' tagged queuing + * limits. + * * The lower 1 MiB limit is the historical upper limit for * hirunningspace. */ hirunningspace = lmax(lmin(roundup(hibufspace / 64, maxbcachebuf), - 16 * 1024 * 1024), 1024 * 1024); + 128 * maxphys), 1024 * 1024); lorunningspace = roundup((hirunningspace * 2) / 3, maxbcachebuf); /*