Source-Changes-HG archive

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

[src/trunk]: src/sys add a `flags' argument to uvm_pagealloc_strat().



details:   https://anonhg.NetBSD.org/src/rev/3efb21ec8041
branches:  trunk
changeset: 471775:3efb21ec8041
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Apr 11 04:04:04 1999 +0000

description:
add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.

diffstat:

 sys/arch/alpha/alpha/machdep.c       |   6 +++---
 sys/arch/alpha/alpha/pmap.c          |   6 +++---
 sys/arch/amiga/amiga/machdep.c       |   4 ++--
 sys/arch/arm32/arm32/machdep.c       |   4 ++--
 sys/arch/arm32/arm32/pmap.c          |   4 ++--
 sys/arch/atari/atari/machdep.c       |   4 ++--
 sys/arch/bebox/bebox/machdep.c       |   4 ++--
 sys/arch/hp300/hp300/machdep.c       |   4 ++--
 sys/arch/i386/i386/machdep.c         |   4 ++--
 sys/arch/i386/i386/pmap.new.c        |   8 ++++----
 sys/arch/mac68k/mac68k/machdep.c     |   4 ++--
 sys/arch/macppc/macppc/machdep.c     |   4 ++--
 sys/arch/mvme68k/mvme68k/machdep.c   |   4 ++--
 sys/arch/newsmips/newsmips/machdep.c |   6 +++---
 sys/arch/next68k/next68k/machdep.c   |   4 ++--
 sys/arch/ofppc/ofppc/machdep.c       |   4 ++--
 sys/arch/pc532/pc532/machdep.c       |   4 ++--
 sys/arch/pc532/pc532/pmap.new.c      |   4 ++--
 sys/arch/pmax/pmax/machdep.c         |   6 +++---
 sys/arch/powerpc/powerpc/pmap.c      |   4 ++--
 sys/arch/sparc/sparc/machdep.c       |   4 ++--
 sys/arch/sparc64/sparc64/machdep.c   |   4 ++--
 sys/arch/sparc64/sparc64/pmap.c      |   4 ++--
 sys/arch/sun3/sun3/machdep.c         |   4 ++--
 sys/arch/sun3/sun3x/machdep.c        |   4 ++--
 sys/arch/vax/vax/machdep.c           |   4 ++--
 sys/arch/x68k/x68k/machdep.c         |   4 ++--
 sys/uvm/uvm_amap.c                   |   4 ++--
 sys/uvm/uvm_aobj.c                   |   6 +++---
 sys/uvm/uvm_extern.h                 |  15 ++++++++++-----
 sys/uvm/uvm_fault.c                  |  12 ++++++------
 sys/uvm/uvm_km.c                     |  12 ++++++------
 sys/uvm/uvm_loan.c                   |   6 +++---
 sys/uvm/uvm_page.c                   |  13 ++++++++-----
 sys/uvm/uvm_vnode.c                  |   4 ++--
 35 files changed, 100 insertions(+), 92 deletions(-)

diffs (truncated from 817 to 300 lines):

diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c    Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/alpha/alpha/machdep.c    Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.167 1999/04/10 01:21:37 cgd Exp $ */
+/* $NetBSD: machdep.c,v 1.168 1999/04/11 04:04:04 chs Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.167 1999/04/10 01:21:37 cgd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.168 1999/04/11 04:04:04 chs Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1064,7 +1064,7 @@
                curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL)
                                panic("cpu_startup: not enough memory for "
                                    "buffer cache");
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c       Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/alpha/alpha/pmap.c       Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.90 1999/04/10 01:21:37 cgd Exp $ */
+/* $NetBSD: pmap.c,v 1.91 1999/04/11 04:04:05 chs Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.90 1999/04/10 01:21:37 cgd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.91 1999/04/11 04:04:05 chs Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -3291,7 +3291,7 @@
        try = 0;        /* try a few times, but give up eventually */
 
        do {
-               pg = uvm_pagealloc(NULL, 0, NULL);
+               pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_USERESERVE);
                if (pg != NULL) {
                        pa = VM_PAGE_TO_PHYS(pg);
                        pmap_zero_page(pa);
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/amiga/amiga/machdep.c
--- a/sys/arch/amiga/amiga/machdep.c    Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/amiga/amiga/machdep.c    Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.133 1999/04/01 00:17:46 thorpej Exp $    */
+/*     $NetBSD: machdep.c,v 1.134 1999/04/11 04:04:05 chs Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -406,7 +406,7 @@
                curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL) 
                                panic("cpu_startup: not enough memory for "
                                    "buffer cache");
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/arm32/arm32/machdep.c
--- a/sys/arch/arm32/arm32/machdep.c    Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/arm32/arm32/machdep.c    Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.65 1999/04/01 00:17:46 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.66 1999/04/11 04:04:05 chs Exp $ */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -451,7 +451,7 @@
                curbufsize = CLBYTES * ((loop < residual) ? (base+1) : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL)
                                panic("cpu_startup: not enough memory for buffer cache");
                        pmap_enter(kernel_map->pmap, curbuf,
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/arm32/arm32/pmap.c
--- a/sys/arch/arm32/arm32/pmap.c       Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/arm32/arm32/pmap.c       Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.59 1999/03/30 20:59:52 mycroft Exp $        */
+/*     $NetBSD: pmap.c,v 1.60 1999/04/11 04:04:06 chs Exp $    */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -2062,7 +2062,7 @@
        
                /* Allocate a page table */
                for (;;) {
-                       m = uvm_pagealloc(NULL, 0, NULL);
+                       m = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_USERESERVE);
                        if (m != NULL)
                                break;
                        
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/atari/atari/machdep.c
--- a/sys/arch/atari/atari/machdep.c    Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/atari/atari/machdep.c    Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.79 1999/04/01 00:17:46 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.80 1999/04/11 04:04:06 chs Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -348,7 +348,7 @@
                curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL) 
                                panic("cpu_startup: not enough memory for "
                                    "buffer cache");
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/bebox/bebox/machdep.c
--- a/sys/arch/bebox/bebox/machdep.c    Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/bebox/bebox/machdep.c    Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.33 1999/04/01 00:17:46 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.34 1999/04/11 04:04:06 chs Exp $ */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -515,7 +515,7 @@
                curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL)
                                panic("startup: not enough memory for "
                                        "buffer cache");
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/hp300/hp300/machdep.c
--- a/sys/arch/hp300/hp300/machdep.c    Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/hp300/hp300/machdep.c    Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.122 1999/04/01 00:17:47 thorpej Exp $    */
+/*     $NetBSD: machdep.c,v 1.123 1999/04/11 04:04:06 chs Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -348,7 +348,7 @@
                curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL) 
                                panic("cpu_startup: not enough memory for "
                                    "buffer cache");
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/i386/i386/machdep.c      Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.349 1999/04/01 00:37:50 thorpej Exp $    */
+/*     $NetBSD: machdep.c,v 1.350 1999/04/11 04:04:07 chs Exp $        */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -592,7 +592,7 @@
                         * 16M of RAM to avoid bouncing file system
                         * transfers.
                         */
-                       pg = uvm_pagealloc_strat(NULL, 0, NULL,
+                       pg = uvm_pagealloc_strat(NULL, 0, NULL, 0,
                            UVM_PGA_STRAT_FALLBACK, VM_FREELIST_FIRST16);
                        if (pg == NULL)
                                panic("cpu_startup: not enough memory for "
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/i386/i386/pmap.new.c
--- a/sys/arch/i386/i386/pmap.new.c     Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/i386/i386/pmap.new.c     Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.new.c,v 1.23 1999/03/26 23:41:30 mycroft Exp $    */
+/*     $NetBSD: pmap.new.c,v 1.24 1999/04/11 04:04:07 chs Exp $        */
 
 /*
  *
@@ -1163,7 +1163,7 @@
   }
 
   pg = uvm_pagealloc(uvmexp.kmem_object, pv_cachedva - vm_map_min(kernel_map),
-                       NULL);
+                       NULL, UVM_PGA_USERESERVE);
   if (pg)
     pg->flags &= ~PG_BUSY;     /* never busy */
 
@@ -1573,8 +1573,8 @@
 {
   struct vm_page *ptp;
 
-  ptp = uvm_pagealloc(&pmap->pm_obj, ptp_i2o(pde_index), NULL);
-
+  ptp = uvm_pagealloc(&pmap->pm_obj, ptp_i2o(pde_index), NULL,
+                     UVM_PGA_USERESERVE);
   if (ptp == NULL) {
     if (just_try)
       return(NULL);
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/mac68k/mac68k/machdep.c
--- a/sys/arch/mac68k/mac68k/machdep.c  Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/mac68k/mac68k/machdep.c  Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.228 1999/04/07 06:45:15 scottr Exp $     */
+/*     $NetBSD: machdep.c,v 1.229 1999/04/11 04:04:07 chs Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -519,7 +519,7 @@
                curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL) 
                                panic("cpu_startup: not enough memory for "
                                    "buffer cache");
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/macppc/macppc/machdep.c
--- a/sys/arch/macppc/macppc/machdep.c  Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/macppc/macppc/machdep.c  Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.38 1999/04/01 00:17:47 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.39 1999/04/11 04:04:08 chs Exp $ */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -524,7 +524,7 @@
                curbufsize = CLBYTES * (i < residual ? base + 1 : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL)
                                panic("cpu_startup: not enough memory for "
                                    "buffer cache");
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/mvme68k/mvme68k/machdep.c
--- a/sys/arch/mvme68k/mvme68k/machdep.c        Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/mvme68k/mvme68k/machdep.c        Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.52 1999/04/01 00:17:48 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.53 1999/04/11 04:04:08 chs Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -447,7 +447,7 @@
                curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL)
                                panic("cpu_startup: not enough memory for "
                                      "buffer cache");
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/newsmips/newsmips/machdep.c
--- a/sys/arch/newsmips/newsmips/machdep.c      Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/newsmips/newsmips/machdep.c      Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.24 1999/04/01 00:17:48 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.25 1999/04/11 04:04:08 chs Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 1999/04/01 00:17:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.25 1999/04/11 04:04:08 chs Exp $");
 
 /* from: Utah Hdr: machdep.c 1.63 91/04/24 */
 
@@ -372,7 +372,7 @@
                curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
 
                while (curbufsize) {
-                       pg = uvm_pagealloc(NULL, 0, NULL);
+                       pg = uvm_pagealloc(NULL, 0, NULL, 0);
                        if (pg == NULL)
                                panic("cpu_startup: not enough memory for "
                                    "buffer cache");
diff -r 2844a97688d2 -r 3efb21ec8041 sys/arch/next68k/next68k/machdep.c
--- a/sys/arch/next68k/next68k/machdep.c        Sun Apr 11 04:03:29 1999 +0000
+++ b/sys/arch/next68k/next68k/machdep.c        Sun Apr 11 04:04:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.19 1999/04/01 00:17:48 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.20 1999/04/11 04:04:08 chs Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -389,7 +389,7 @@



Home | Main Index | Thread Index | Old Index