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/arch | |
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/arch')
-rw-r--r-- | sys/arch/i386/i386/pmapae.c | 15 | ||||
-rw-r--r-- | sys/arch/sparc/include/vmparam.h | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/include/vmparam.h | 5 |
3 files changed, 12 insertions, 13 deletions
diff --git a/sys/arch/i386/i386/pmapae.c b/sys/arch/i386/i386/pmapae.c index 8b17da23f22..317295656a2 100644 --- a/sys/arch/i386/i386/pmapae.c +++ b/sys/arch/i386/i386/pmapae.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmapae.c,v 1.20 2009/08/06 15:28:14 oga Exp $ */ +/* $OpenBSD: pmapae.c,v 1.21 2010/04/22 19:02:44 oga Exp $ */ /* * Copyright (c) 2006 Michael Shalayeff @@ -364,7 +364,7 @@ * is a void function. * * [B] new page tables pages (PTP) - * call pae_pagealloc() + * call uvm_pagealloc() * => success: zero page, add to pm_pdir * => failure: we are out of free vm_pages, let pmap_enter() * tell UVM about it. @@ -553,13 +553,6 @@ extern int pmap_pg_g; extern struct pmap_head pmaps; /* - * a towards larger memory prioritised version opf uvm_pagealloc() - */ -#define pae_pagealloc(obj, off, anon, flags) \ - uvm_pagealloc_strat((obj), (off), (anon), (flags), \ - UVM_PGA_STRAT_FALLBACK, VM_FREELIST_ABOVE4G) - -/* * local prototypes */ @@ -801,7 +794,7 @@ pmap_bootstrap_pae() for (va = KERNBASE, eva = va + (nkpde << 22); va < eva; va += PAGE_SIZE) { if (!pmap_valid_entry(PDE(kpm, pdei(va)))) { - ptp = pae_pagealloc(&kpm->pm_obj, va, NULL, + ptp = uvm_pagealloc(&kpm->pm_obj, va, NULL, UVM_PGA_ZERO); ptaddr = VM_PAGE_TO_PHYS(ptp); PDE(kpm, pdei(va)) = ptaddr | PG_KW | PG_V; @@ -977,7 +970,7 @@ pmap_alloc_ptp_pae(struct pmap *pmap, int pde_index, boolean_t just_try) { struct vm_page *ptp; - ptp = pae_pagealloc(&pmap->pm_obj, ptp_i2o(pde_index), NULL, + ptp = uvm_pagealloc(&pmap->pm_obj, ptp_i2o(pde_index), NULL, UVM_PGA_USERESERVE|UVM_PGA_ZERO); if (ptp == NULL) return(NULL); diff --git a/sys/arch/sparc/include/vmparam.h b/sys/arch/sparc/include/vmparam.h index 8dc59a3729f..a7ba9e169b3 100644 --- a/sys/arch/sparc/include/vmparam.h +++ b/sys/arch/sparc/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.33 2008/07/22 18:15:48 miod Exp $ */ +/* $OpenBSD: vmparam.h,v 1.34 2010/04/22 19:02:47 oga Exp $ */ /* $NetBSD: vmparam.h,v 1.13 1997/07/12 16:20:03 perry Exp $ */ /* @@ -130,6 +130,9 @@ struct vm_page_md { #define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 +/* No UVM_IO_RANGES required: IOMMU takes care of this. */ +#define UVM_IO_RANGES {} + #if defined (_KERNEL) && !defined(_LOCORE) struct vm_map; #define dvma_mapin(map,va,len,canwait) dvma_mapin_space(map,va,len,canwait,0) diff --git a/sys/arch/sparc64/include/vmparam.h b/sys/arch/sparc64/include/vmparam.h index f2239697466..b3eca0ba6a4 100644 --- a/sys/arch/sparc64/include/vmparam.h +++ b/sys/arch/sparc64/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.18 2008/07/18 16:40:17 kurt Exp $ */ +/* $OpenBSD: vmparam.h,v 1.19 2010/04/22 19:02:49 oga Exp $ */ /* $NetBSD: vmparam.h,v 1.18 2001/05/01 02:19:19 thorpej Exp $ */ /* @@ -145,6 +145,9 @@ #define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 +/* No UVM_IO_RANGES required: IOMMU takes care of this. */ +#define UVM_IO_RANGES {} + #define __HAVE_VM_PAGE_MD /* * For each struct vm_page, there is a list of all currently valid virtual |