git: kernel - Fix excessive VM pageout flushes

Matthew Dillon dillon at
Wed Apr 22 21:20:35 PDT 2020

commit 92568a97fa2ee3039998a6382afb3ea6345480ec
Author: Matthew Dillon <dillon at>
Date:   Wed Apr 22 19:39:37 2020 -0700

    kernel - Fix excessive VM pageout flushes
    * The VM pageout code was calculating the laundering limit improperly.
      We were trying to calculate a per-pass limit within each queue list
      but were not taking into account the fact that the number of queues
      have greatly increased in the last few years AND also that the paging
      scans only check 1/10 of each queue for each scan.
      These fixes allow the pageout scan to pick-up many more clean pages
      before beginning to stall-out on dirty pages.
    * vm_max_launder is now calculated as 1/256 of physical memory at startup
      instead of hardwired.
    * local max_launder calculations now take into account the number of
      queues and the fact that only 1/10 of each queue is checked in each
      In addition, the local max_launder calculation is increased by the
      pass number divided by 10 so as to only increase for each full queue
    * the 'pass' variable passed down into helper functions is now divided
      by 10 because we do not want it to 'increment' and trigger stronger
      behavior until after the entire inactive queue has been scanned.

Summary of changes:
 sys/vm/vm_pageout.c | 130 ++++++++++++++++++++++++++++++----------------------
 1 file changed, 74 insertions(+), 56 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list