kernel - VM rework part 21 - Fix excessive paging to swap bug
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 28 Jun 2019 22:35:18 +0000 (15:35 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 28 Jun 2019 22:35:18 +0000 (15:35 -0700)
commit2aa63302a428b68c2ebab621771aaf0d21bb6370
treedbe0723f150da58763d785f63b1e489e5b16cea8
parentf61c0db8d3c3bbcefcee455720a996809df4b004
kernel - VM rework part 21 - Fix excessive paging to swap bug

* Fix a bug where pages on the inactive queue would sometimes not
  get moved to the cache queue after being paged out, and also not
  get its [M]odify bit cleared, causing the pageout demon to repeatedly
  write numerous pages out without making progress.

  This may require some additional work to avoid a double-pageout
  condition, but it fixes the main issue.

* Returns us back to the 'feel' of paging prior to the VM rework,
  and should reduce stuttering in chrome and other paging-related lag
  users might experience.

  The bug was introduced due to differences in how the pmap code
  handle vm_page_protect(..., VM_PROT_READ).
sys/vm/vm_pageout.c