vm_pageout: Correct threshold calculation on single-CPU systems

Reported by:	Michael Butler
X-MFC-With:	r364129
This commit is contained in:
Conrad Meyer 2020-08-14 18:48:48 +00:00
parent 85232c2ff1
commit ea7b737a6f

View File

@ -2216,7 +2216,7 @@ get_pageout_threads_per_domain(void)
* Semi-arbitrarily constrain pagedaemon threads to less than half the
* total number of threads in the system as an insane upper limit.
*/
half_cpus_per_dom = (mp_ncpus / vm_ndomains) / 2;
half_cpus_per_dom = howmany(mp_ncpus / vm_ndomains, 2);
if (pageout_threads_per_domain < 1) {
printf("Invalid tuneable vm.pageout_threads_per_domain value: "