Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 2014 05:34:10 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273026 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201410130534.s9D5YA3M022728@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Mon Oct 13 05:34:10 2014
New Revision: 273026
URL: https://svnweb.freebsd.org/changeset/base/273026

Log:
  Add a tunable for arc_shrink_shift (vfs.zfs.arc_shrink_shift) that
  controls how much fraction, 1/2^arc_shrink_shift, should be reclaimed
  when there is memory pressure.
  
  Submitted by:	Richard Kojedzinszky <krichy at tvnetwork.hu>
  MFC after:	2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Mon Oct 13 03:55:47 2014	(r273025)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Mon Oct 13 05:34:10 2014	(r273026)
@@ -217,6 +217,7 @@ SYSINIT(arc_free_target_init, SI_SUB_KTH
     arc_free_target_init, NULL);
 
 TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit);
+TUNABLE_INT("vfs.zfs.arc_shrink_shift", &zfs_arc_shrink_shift);
 SYSCTL_DECL(_vfs_zfs);
 SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0,
     "Maximum ARC size");
@@ -225,6 +226,10 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min
 SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_average_blocksize, CTLFLAG_RDTUN,
     &zfs_arc_average_blocksize, 0,
     "ARC average blocksize");
+SYSCTL_INT(_vfs_zfs, OID_AUTO, arc_shrink_shift, CTLFLAG_RW,
+    &arc_shrink_shift, 0,
+    "log2(fraction of arc to reclaim)");
+
 /*
  * We don't have a tunable for arc_free_target due to the dependency on
  * pagedaemon initialisation.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410130534.s9D5YA3M022728>