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).