svn commit: r255258 - vendor-sys/illumos/dist/uts/common/fs/zfs

Xin LI delphij at FreeBSD.org
Thu Sep 5 17:58:26 UTC 2013


Author: delphij
Date: Thu Sep  5 17:58:25 2013
New Revision: 255258
URL: http://svnweb.freebsd.org/changeset/base/255258

Log:
  Update vendor-sys/illumos/dist to 14176:15e9457c12ec:
  
  Illumos ZFS issues:
    1974 pages_pp_maximum/lotsfree discrepancy leads to mlock()
         failure

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c	Thu Sep  5 17:56:00 2013	(r255257)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c	Thu Sep  5 17:58:25 2013	(r255258)
@@ -21,6 +21,7 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  * Copyright (c) 2013 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  */
@@ -2235,6 +2236,16 @@ arc_reclaim_needed(void)
 	if (availrmem < swapfs_minfree + swapfs_reserve + extra)
 		return (1);
 
+	/*
+	 * Check that we have enough availrmem that memory locking (e.g., via
+	 * mlock(3C) or memcntl(2)) can still succeed.  (pages_pp_maximum
+	 * stores the number of pages that cannot be locked; when availrmem
+	 * drops below pages_pp_maximum, page locking mechanisms such as
+	 * page_pp_lock() will fail.)
+	 */
+	if (availrmem <= pages_pp_maximum)
+		return (1);
+
 #if defined(__i386)
 	/*
 	 * If we're on an i386 platform, it's possible that we'll exhaust the


More information about the svn-src-all mailing list