From 1ff2fd5024f7dde624085fb41339e9dbbfe63fec Mon Sep 17 00:00:00 2001 From: mpi Date: Tue, 28 Jun 2022 19:23:08 +0000 Subject: [PATCH] Use new & shiny define for the maximum number of pages of a swap cluster. ok beck@, kettenis@ --- sys/uvm/uvm_pdaemon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index 5d66cbdbc57..99cadaa06de 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.99 2022/05/12 12:49:31 mpi Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.100 2022/06/28 19:23:08 mpi Exp $ */ /* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */ /* @@ -385,9 +385,9 @@ uvmpd_scan_inactive(struct pglist *pglst) int free, result; struct vm_page *p, *nextpg; struct uvm_object *uobj; - struct vm_page *pps[MAXBSIZE >> PAGE_SHIFT], **ppsp; + struct vm_page *pps[SWCLUSTPAGES], **ppsp; int npages; - struct vm_page *swpps[MAXBSIZE >> PAGE_SHIFT]; /* XXX: see below */ + struct vm_page *swpps[SWCLUSTPAGES]; /* XXX: see below */ int swnpages, swcpages; /* XXX: see below */ int swslot; struct vm_anon *anon; @@ -611,7 +611,7 @@ uvmpd_scan_inactive(struct pglist *pglst) /* start new cluster (if necessary) */ if (swslot == 0) { - swnpages = MAXBSIZE >> PAGE_SHIFT; + swnpages = SWCLUSTPAGES; swslot = uvm_swap_alloc(&swnpages, TRUE); if (swslot == 0) { -- 2.20.1