Restore the pre-r329882 inactive page shortage computation.

With r329882, in the absence of a free page shortage we would only take
len(PQ_INACTIVE)+len(PQ_LAUNDRY) into account when deciding whether to
aggressively scan PQ_ACTIVE. Previously we would also include the
number of free pages in this computation, ensuring that we wouldn't scan
PQ_ACTIVE with plenty of free memory available. The change in behaviour
was most noticeable immediately after booting, when PQ_INACTIVE and
PQ_LAUNDRY are nearly empty.

Reviewed by:	jeff
This commit is contained in:
Mark Johnston 2018-02-24 20:47:22 +00:00
parent 67eae5035b
commit 59d3150b58
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329929

View File

@ -1398,7 +1398,7 @@ vm_pageout_scan(struct vm_domain *vmd, int pass, int shortage)
*/
inactq_shortage = vmd->vmd_inactive_target - (pq->pq_cnt +
vmd->vmd_pagequeues[PQ_LAUNDRY].pq_cnt / act_scan_laundry_weight) +
shortage + deficit + addl_page_shortage;
vm_paging_target(vmd) + deficit + addl_page_shortage;
inactq_shortage *= act_scan_laundry_weight;
pq = &vmd->vmd_pagequeues[PQ_ACTIVE];