Index: sys/vm/swap_pager.c =================================================================== --- sys/vm/swap_pager.c +++ sys/vm/swap_pager.c @@ -541,6 +541,14 @@ */ n -= ((n + 2) / 3); } while (n > 0); + + /* + * uma_zone_reserve_kva() often cannot reserve precisly the + * requested size. Account for the slack 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);