Author: cem
Date: Fri Aug 14 18:48:48 2020
New Revision: 364237
URL: https://svnweb.freebsd.org/changeset/base/364237

Log:
  vm_pageout: Correct threshold calculation on single-CPU systems
  
  Reported by:  Michael Butler
  X-MFC-With:   r364129

Modified:
  head/sys/vm/vm_pageout.c

Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c    Fri Aug 14 16:44:10 2020        (r364236)
+++ head/sys/vm/vm_pageout.c    Fri Aug 14 18:48:48 2020        (r364237)
@@ -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: "
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to