summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2024-11-05 17:28:33 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2024-11-05 17:28:33 +0000
commit9d3d4a8542a6b6a4f74235ccd6deb031f0a426c8 (patch)
tree07ce4a9a03a9778883f91dde026d431fee9d68f4 /sys/uvm
parent0d5d60cf520ccfec84e627ec3405ac6053aa2846 (diff)
Return the number of freed pages in bufbackoff().
Reviewed by miod@, ok tb@, beck@
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_pdaemon.c4
-rw-r--r--sys/uvm/uvm_pmemrange.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c
index 5f52c9afcf1..d7418cfdafd 100644
--- a/sys/uvm/uvm_pdaemon.c
+++ b/sys/uvm/uvm_pdaemon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pdaemon.c,v 1.120 2024/11/05 15:29:00 mpi Exp $ */
+/* $OpenBSD: uvm_pdaemon.c,v 1.121 2024/11/05 17:28:32 mpi Exp $ */
/* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */
/*
@@ -132,7 +132,7 @@ uvm_wait(const char *wmsg)
*/
if (curproc == uvm.pagedaemon_proc) {
printf("uvm_wait emergency bufbackoff\n");
- if (bufbackoff(NULL, 4) == 0)
+ if (bufbackoff(NULL, 4) >= 4)
return;
/*
* now we have a problem: the pagedaemon wants to go to
diff --git a/sys/uvm/uvm_pmemrange.c b/sys/uvm/uvm_pmemrange.c
index 86a6cc61339..5bc213a27cc 100644
--- a/sys/uvm/uvm_pmemrange.c
+++ b/sys/uvm/uvm_pmemrange.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pmemrange.c,v 1.69 2024/11/05 17:02:19 mpi Exp $ */
+/* $OpenBSD: uvm_pmemrange.c,v 1.70 2024/11/05 17:28:32 mpi Exp $ */
/*
* Copyright (c) 2024 Martin Pieuchot <mpi@openbsd.org>
@@ -2122,7 +2122,7 @@ uvm_wait_pla(paddr_t low, paddr_t high, paddr_t size, int failok)
* easily use up that reserve in a single scan iteration.
*/
uvm_unlock_fpageq();
- if (bufbackoff(NULL, atop(size)) == 0) {
+ if (bufbackoff(NULL, atop(size)) >= atop(size)) {
uvm_lock_fpageq();
return 0;
}