diff options
Diffstat (limited to 'sys/uvm/uvm_pdaemon.c')
-rw-r--r-- | sys/uvm/uvm_pdaemon.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index a6f643f24bf..834226f68a2 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.85 2019/12/30 23:58:38 jsg Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.86 2020/04/04 22:08:02 kettenis Exp $ */ /* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */ /* @@ -210,7 +210,6 @@ uvm_pageout(void *arg) { struct uvm_constraint_range constraint; struct uvm_pmalloc *pma; - int work_done; int npages = 0; /* ensure correct priority and set paging parameters... */ @@ -223,7 +222,6 @@ uvm_pageout(void *arg) for (;;) { long size; - work_done = 0; /* No work done this iteration. */ uvm_lock_fpageq(); if (!uvm_nowait_failed && TAILQ_EMPTY(&uvm.pmr_control.allocs)) { @@ -282,7 +280,6 @@ uvm_pageout(void *arg) ((uvmexp.free - BUFPAGES_DEFICIT) < uvmexp.freetarg) || ((uvmexp.inactive + BUFPAGES_INACT) < uvmexp.inactarg)) { uvmpd_scan(); - work_done = 1; /* XXX we hope... */ } /* @@ -296,15 +293,18 @@ uvm_pageout(void *arg) } if (pma != NULL) { + /* + * XXX If UVM_PMA_FREED isn't set, no pages + * were freed. Should we set UVM_PMA_FAIL in + * that case? + */ pma->pm_flags &= ~UVM_PMA_BUSY; - if (!work_done) - pma->pm_flags |= UVM_PMA_FAIL; - if (pma->pm_flags & (UVM_PMA_FAIL | UVM_PMA_FREED)) { + if (pma->pm_flags & UVM_PMA_FREED) { pma->pm_flags &= ~UVM_PMA_LINKED; TAILQ_REMOVE(&uvm.pmr_control.allocs, pma, pmq); + wakeup(pma); } - wakeup(pma); } uvm_unlock_fpageq(); |