From: kettenis Date: Tue, 7 Jun 2022 12:02:52 +0000 (+0000) Subject: Remove redundant check for free pages. The pmemrange code that is called X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=aff4b1ea12fb7249aedccd91c46186865b57767d;p=openbsd Remove redundant check for free pages. The pmemrange code that is called by uvm_pglistalloc(9) does a similar check already. ok mpi@ --- diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index d49969cfe9c..03914c1a7d1 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.c,v 1.155 2022/04/28 09:58:11 mpi Exp $ */ +/* $OpenBSD: uvm_swap.c,v 1.156 2022/06/07 12:02:52 kettenis Exp $ */ /* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */ /* @@ -328,17 +328,6 @@ uvm_swap_allocpages(struct vm_page **pps, int npages) { struct pglist pgl; int i; - boolean_t fail; - - /* Estimate if we will succeed */ - uvm_lock_fpageq(); - - fail = uvmexp.free - npages < uvmexp.reserve_kernel; - - uvm_unlock_fpageq(); - - if (fail) - return FALSE; TAILQ_INIT(&pgl); if (uvm_pglistalloc(npages * PAGE_SIZE, dma_constraint.ucr_low,