Restore the historical behavior of "sysctl vm.swap_idle_enabled=1". Prior
to r254304, we had separate functions for reclamation and laundering (vm_pageout_scan) versus updating usage information, i.e., "reference bits", on active pages (vm_pageout_page_stats), and we only performed vm_req_vmdaemon(VM_SWAP_IDLE) if vm_pages_needed was true. However, since r254303, if vm_swap_idle_enabled was "1", we have performed vm_req_vmdaemon(VM_SWAP_IDLE) regardless of whether we are short of free pages. This was unintended and too aggressive, so I suspect no one uses this feature. With this change, we restore the historical behavior and only perform vm_req_vmdaemon(VM_SWAP_IDLE) when we are short of free pages. Reviewed by: kib, markj
This commit is contained in:
parent
d4c22202e6
commit
87ff568c26
@ -1289,9 +1289,10 @@ vm_pageout_scan(struct vm_domain *vmd, int pass)
|
||||
vm_pagequeue_unlock(pq);
|
||||
#if !defined(NO_SWAPPING)
|
||||
/*
|
||||
* Idle process swapout -- run once per second.
|
||||
* Idle process swapout -- run once per second when we are reclaiming
|
||||
* pages.
|
||||
*/
|
||||
if (vm_swap_idle_enabled) {
|
||||
if (vm_swap_idle_enabled && pass > 0) {
|
||||
static long lsec;
|
||||
if (time_second != lsec) {
|
||||
vm_req_vmdaemon(VM_SWAP_IDLE);
|
||||
|
Loading…
Reference in New Issue
Block a user