Date: Fri, 20 Oct 2017 09:21:37 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r324796 - stable/11/sys/vm Message-ID: <201710200921.v9K9LbJC060631@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Oct 20 09:21:37 2017 New Revision: 324796 URL: https://svnweb.freebsd.org/changeset/base/324796 Log: MFC r324600, r324716: Evaluate the real size of the sblk_zone. Modified: stable/11/sys/vm/swap_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Fri Oct 20 09:10:49 2017 (r324795) +++ stable/11/sys/vm/swap_pager.c Fri Oct 20 09:21:37 2017 (r324796) @@ -540,7 +540,15 @@ swap_pager_swap_init(void) */ n -= ((n + 2) / 3); } while (n > 0); - if (n2 != n) + + /* + * 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 (n < n2) printf("Swap blk zone entries reduced from %lu to %lu.\n", n2, n); swap_maxpages = n * SWAP_META_PAGES;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710200921.v9K9LbJC060631>