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
This commit is contained in:
Konstantin Belousov 2017-10-13 16:23:05 +00:00
parent 33bfd7db54
commit 53faf5a7d4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=324600

View file

@ -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);