diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-10-02 10:24:12 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-10-02 10:24:12 +0000 |
commit | a70ff2be43e9391ddd1df1d8a6898ded9e077507 (patch) | |
tree | e473d9228ea17ebe8154ac784796766ba06f3425 /sys/uvm | |
parent | 4029d3573e2c5b3584e779c1c351b970aebd7a5c (diff) |
Improve responsiveness in OOM situations & make free target checks coherent.
Remove a change introduced in NetBSD to pageout 4 times as many pages as
required to meet the low water mark of free pages. With todays' Gbs of
RAMs, it makes the pagedaemon hog the CPU for too long when the amount of
free pages is close to none.
ok sthen@, kettenis@
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_pdaemon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index be32a5ab635..973b4acec88 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.115 2024/09/30 08:09:39 mpi Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.116 2024/10/02 10:24:11 mpi Exp $ */ /* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */ /* @@ -468,7 +468,7 @@ uvmpd_scan_inactive(struct uvm_pmalloc *pma, */ free = uvmexp.free - BUFPAGES_DEFICIT; if (((pma == NULL || (pma->pm_flags & UVM_PMA_FREED)) && - (free + uvmexp.paging >= uvmexp.freetarg << 2)) || + (free + uvmexp.paging >= uvmexp.freetarg)) || dirtyreacts == UVMPD_NUMDIRTYREACTS) { if (swslot == 0) { /* exit now if no swap-i/o pending */ @@ -565,7 +565,7 @@ uvmpd_scan_inactive(struct uvm_pmalloc *pma, * free target when all the current pageouts complete. */ if ((pma == NULL || (pma->pm_flags & UVM_PMA_FREED)) && - (free + uvmexp.paging > uvmexp.freetarg << 2)) { + (free + uvmexp.paging > uvmexp.freetarg)) { rw_exit(slock); continue; } |