From aff4b1ea12fb7249aedccd91c46186865b57767d Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 7 Jun 2022 12:02:52 +0000 Subject: [PATCH] Remove redundant check for free pages. The pmemrange code that is called by uvm_pglistalloc(9) does a similar check already. ok mpi@ --- sys/uvm/uvm_swap.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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, -- 2.20.1