diff options
author | mav <mav@FreeBSD.org> | 2016-10-14 07:45:10 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-10-14 07:45:10 +0000 |
commit | 82abe4d6a038a50abb02306ef6a12bd8bd116537 (patch) | |
tree | 8ff20a473e04eb78b7b0bcb27351469181438abc | |
parent | 5329a3ac7319f1769eafe7eb97255278279a1ce1 (diff) | |
download | FreeBSD-src-82abe4d6a038a50abb02306ef6a12bd8bd116537.zip FreeBSD-src-82abe4d6a038a50abb02306ef6a12bd8bd116537.tar.gz |
MFC r305561: MFV r305560:
7278 tuning zfs_arc_max does not impact arc_c_min
When changing zfs_arc_max (e.g. as zdb does), it may be set to less
than the default arc_c_min. arc_c_min should decrease to not be more than
arc_c_max, but it doesn't; therefore tuning of arc_c_max is ineffective.
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Author: Matthew Ahrens <mahrens@delphix.com>
openzfs/openzfs@608764beadaf4bb71c5d8fe1818e8392ac66a61b
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c index 2bb9f77..d6ccf3d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -5998,8 +5998,10 @@ arc_init(void) * Allow the tunables to override our calculations if they are * reasonable. */ - if (zfs_arc_max > arc_abs_min && zfs_arc_max < kmem_size()) + if (zfs_arc_max > arc_abs_min && zfs_arc_max < kmem_size()) { arc_c_max = zfs_arc_max; + arc_c_min = MIN(arc_c_min, arc_c_max); + } if (zfs_arc_min > arc_abs_min && zfs_arc_min <= arc_c_max) arc_c_min = zfs_arc_min; #endif |