Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/uvm pull up 1.17 -> 1.18:
details: https://anonhg.NetBSD.org/src/rev/cc17285c881b
branches: netbsd-1-4
changeset: 468290:cc17285c881b
user: chs <chs%NetBSD.org@localhost>
date: Fri Apr 16 16:29:34 1999 +0000
description:
pull up 1.17 -> 1.18:
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/uvm/uvm_page.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 86ed80ed0810 -r cc17285c881b sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Fri Apr 16 16:29:09 1999 +0000
+++ b/sys/uvm/uvm_page.c Fri Apr 16 16:29:34 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.17 1999/03/26 21:58:39 mycroft Exp $ */
+/* $NetBSD: uvm_page.c,v 1.17.2.1 1999/04/16 16:29:34 chs Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -810,15 +810,17 @@
*/
struct vm_page *
-uvm_pagealloc_strat(obj, off, anon, strat, free_list)
+uvm_pagealloc_strat(obj, off, anon, flags, strat, free_list)
struct uvm_object *obj;
vaddr_t off;
+ int flags;
struct vm_anon *anon;
int strat, free_list;
{
int lcv, s;
struct vm_page *pg;
struct pglist *freeq;
+ boolean_t use_reserve;
#ifdef DIAGNOSTIC
/* sanity check */
@@ -848,10 +850,11 @@
* the requestor isn't the pagedaemon.
*/
- if ((uvmexp.free <= uvmexp.reserve_kernel &&
- !(obj && obj->uo_refs == UVM_OBJ_KERN)) ||
+ use_reserve = (flags & UVM_PGA_USERESERVE) ||
+ (obj && obj->uo_refs == UVM_OBJ_KERN);
+ if ((uvmexp.free <= uvmexp.reserve_kernel && !use_reserve) ||
(uvmexp.free <= uvmexp.reserve_pagedaemon &&
- !(obj == uvmexp.kmem_object && curproc == uvm.pagedaemon_proc)))
+ !(use_reserve && curproc == uvm.pagedaemon_proc)))
goto fail;
again:
Home |
Main Index |
Thread Index |
Old Index