From 527aa409057c8723cfcedfdfd97a973a53a31aac Mon Sep 17 00:00:00 2001 From: Bryan Cantrill Date: Tue, 6 Sep 2011 10:32:53 -0700 Subject: OS-583 swapfs_minfree is set egregiously high --- usr/src/uts/common/fs/swapfs/swap_subr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr/src/uts/common/fs/swapfs/swap_subr.c') diff --git a/usr/src/uts/common/fs/swapfs/swap_subr.c b/usr/src/uts/common/fs/swapfs/swap_subr.c index 74c4302da9..a4d983665b 100644 --- a/usr/src/uts/common/fs/swapfs/swap_subr.c +++ b/usr/src/uts/common/fs/swapfs/swap_subr.c @@ -110,9 +110,11 @@ swapfs_recalc(pgcnt_t pgs) * memory that can be used as swap space should do so by * setting swapfs_desfree at boot time, not swapfs_minfree. * However, swapfs_minfree is tunable by install as a - * workaround for bugid 1147463. + * workaround for bugid 1147463. Note swapfs_minfree is set + * to 1/8th of memory, but clamped at the limit of 256 MB. */ - new_swapfs_minfree = MAX(btopr(2 * 1024 * 1024), pgs >> 3); + new_swapfs_minfree = MIN(MAX(btopr(2 * 1024 * 1024), pgs >> 3), + btopr(256 * 1024 * 1024)); } /* -- cgit v1.2.3