kernel - VM rework part 21 - Fix excessive paging to swap bug
commitd7e883fdbf85067272b0d3279e56976cde73ff91
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 28 Jun 2019 22:35:18 +0000 (28 15:35 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 28 Jun 2019 22:46:44 +0000 (28 15:46 -0700)
tree2bd86e49c5afd2cbaf0a636c78c44506ac9657f3
parent733719bd9e10a6d1282245960209fcd8840ccae8
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