Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/uvm Pull up revision 1.60 (requested by tls in tick...



details:   https://anonhg.NetBSD.org/src/rev/4b7d9ab56d24
branches:  netbsd-1-6
changeset: 530615:4b7d9ab56d24
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Aug 26 06:47:08 2003 +0000

description:
Pull up revision 1.60 (requested by tls in ticket #1434):
Correct use of MAXBSIZE where MAXPHYS was intended.  This is a necessary
first step towards per-device MAXPHYS, and has the beneficial side effect
of allowing clustering to MAXPHYS even on systems that need to run with
a reduced MAXBSIZE to get more metadata buffers.

diffstat:

 sys/uvm/uvm_pager.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 1ffa030f3ac3 -r 4b7d9ab56d24 sys/uvm/uvm_pager.c
--- a/sys/uvm/uvm_pager.c       Tue Aug 26 06:46:59 2003 +0000
+++ b/sys/uvm/uvm_pager.c       Tue Aug 26 06:47:08 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pager.c,v 1.57 2002/05/15 06:57:50 matt Exp $      */
+/*     $NetBSD: uvm_pager.c,v 1.57.4.1 2003/08/26 06:47:08 tron Exp $  */
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.57 2002/05/15 06:57:50 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.57.4.1 2003/08/26 06:47:08 tron Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -95,7 +95,7 @@
            FALSE, NULL);
        simple_lock_init(&pager_map_wanted_lock);
        pager_map_wanted = FALSE;
-       emergva = uvm_km_valloc(kernel_map, MAXBSIZE);
+       emergva = uvm_km_valloc(kernel_map, round_page(MAXPHYS));
        emerginuse = FALSE;
 
        /*
@@ -162,7 +162,8 @@
                        emerginuse = TRUE;
                        simple_unlock(&pager_map_wanted_lock);
                        kva = emergva;
-                       KASSERT(npages <= MAXBSIZE >> PAGE_SHIFT);
+                       /* The shift implicitly truncates to PAGE_SIZE */
+                       KASSERT(npages <= (MAXPHYS >> PAGE_SHIFT));
                        goto enter;
                }
                if ((flags & UVMPAGER_MAPIN_WAITOK) == 0) {



Home | Main Index | Thread Index | Old Index