diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-04-22 19:02:56 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-04-22 19:02:56 +0000 |
commit | 06f07da7e6659ce9de50f80088d0c37b13d4b829 (patch) | |
tree | 61465ef7199c8a6f5432bf287ad9dc234fdaeb79 /sys/uvm/uvm_extern.h | |
parent | a9c39c19e55d16c05e07be8dfd52db61ccf53e99 (diff) |
Committing on behalf or ariane@.
recommit pmemrange:
physmem allocator: change the view of free memory from single
free pages to free ranges. Classify memory based on region with
associated use-counter (which is used to construct a priority
list of where to allocate memory).
Based on code from tedu@, help from many.
Useable now that bugs have been found and fixed in most architecture's
pmap.c
ok by everyone who has done a pmap or uvm commit in the last year.
Diffstat (limited to 'sys/uvm/uvm_extern.h')
-rw-r--r-- | sys/uvm/uvm_extern.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index f3a156d923a..5de889ddb48 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.84 2010/03/24 00:36:04 oga Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.85 2010/04/22 19:02:55 oga Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -208,14 +208,14 @@ typedef int vm_prot_t; #define UVM_KMF_TRYLOCK UVM_FLAG_TRYLOCK /* try locking only */ /* - * the following defines the strategies for uvm_pagealloc_strat() + * the following defines the strategies for uvm_pagealloc() */ #define UVM_PGA_STRAT_NORMAL 0 /* high -> low free list walk */ #define UVM_PGA_STRAT_ONLY 1 /* only specified free list */ #define UVM_PGA_STRAT_FALLBACK 2 /* ONLY falls back on NORMAL */ /* - * flags for uvm_pagealloc_strat() + * flags for uvm_pagealloc() */ #define UVM_PGA_USERESERVE 0x0001 /* ok to use reserve pages */ #define UVM_PGA_ZERO 0x0002 /* returned page must be zeroed */ @@ -226,6 +226,7 @@ typedef int vm_prot_t; #define UVM_PLA_WAITOK 0x0001 /* may sleep */ #define UVM_PLA_NOWAIT 0x0002 /* can't sleep (need one of the two) */ #define UVM_PLA_ZERO 0x0004 /* zero all pages before returning */ +#define UVM_PLA_TRYCONTIG 0x0008 /* try to allocate contig physmem */ /* * lockflags that control the locking behavior of various functions. @@ -564,11 +565,8 @@ int uvm_mmap(vm_map_t, vaddr_t *, vsize_t, caddr_t, voff_t, vsize_t, struct proc *); /* uvm_page.c */ -struct vm_page *uvm_pagealloc_strat(struct uvm_object *, - voff_t, struct vm_anon *, int, int, int); -#define uvm_pagealloc(obj, off, anon, flags) \ - uvm_pagealloc_strat((obj), (off), (anon), (flags), \ - UVM_PGA_STRAT_NORMAL, 0) +struct vm_page *uvm_pagealloc(struct uvm_object *, + voff_t, struct vm_anon *, int); vaddr_t uvm_pagealloc_contig(vaddr_t, vaddr_t, vaddr_t, vaddr_t); void uvm_pagerealloc(struct vm_page *, @@ -596,6 +594,9 @@ int uvm_pglistalloc(psize_t, paddr_t, struct pglist *, int, int); void uvm_pglistfree(struct pglist *); +/* uvm_pmemrange.c */ +void uvm_pmr_use_inc(paddr_t, paddr_t); + /* uvm_swap.c */ void uvm_swap_init(void); |