Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2017 16:23:05 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324600 - head/sys/vm
Message-ID:  <201710131623.v9DGN5gr085448@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Oct 13 16:23:05 2017
New Revision: 324600
URL: https://svnweb.freebsd.org/changeset/base/324600

Log:
  Evaluate the real size of the sblk_zone.
  
  Submitted by:	ota@j.email.ne.jp
  PR:	221356
  Reviewed by:	alc, markj
  MFC after:	1 week
  Differential revision:	https://reviews.freebsd.org/D12660

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==============================================================================
--- head/sys/vm/swap_pager.c	Fri Oct 13 15:16:57 2017	(r324599)
+++ head/sys/vm/swap_pager.c	Fri Oct 13 16:23:05 2017	(r324600)
@@ -541,6 +541,14 @@ swap_pager_swap_init(void)
 		 */
 		n -= ((n + 2) / 3);
 	} while (n > 0);
+
+	/*
+	 * Often uma_zone_reserve_kva() cannot reserve exactly the
+	 * requested size.  Account for the difference when
+	 * calculating swap_maxpages.
+	 */
+	n = uma_zone_get_max(swblk_zone);
+
 	if (n2 != n)
 		printf("Swap blk zone entries reduced from %lu to %lu.\n",
 		    n2, n);



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