diff options
author | ian <ian@FreeBSD.org> | 2014-05-15 19:09:31 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-15 19:09:31 +0000 |
commit | 24fc8c91c2a303dba31262f57dc8f84b411be5dd (patch) | |
tree | 2e4dfb68203c51cfd6406ba8d87578b7f5b99263 /sys/arm/include | |
parent | c287c5d5301219fe2fabc25222edae29e314c213 (diff) | |
download | FreeBSD-src-24fc8c91c2a303dba31262f57dc8f84b411be5dd.zip FreeBSD-src-24fc8c91c2a303dba31262f57dc8f84b411be5dd.tar.gz |
MFC r257549, r261642
Don't create a distinct free page pool for segregating allocations that are
accessed through the direct map unless the kernel configuration actually
includes a direct map. Only a few configurations do, and for the rest the
unnecessary free page pool is a small pessimization.
Remove the ARM_USE_SMALL_ALLOC option and code related to it.
Diffstat (limited to 'sys/arm/include')
-rw-r--r-- | sys/arm/include/pmap.h | 11 | ||||
-rw-r--r-- | sys/arm/include/sf_buf.h | 27 | ||||
-rw-r--r-- | sys/arm/include/vmparam.h | 32 |
3 files changed, 8 insertions, 62 deletions
diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h index d796c46..8b98f6c 100644 --- a/sys/arm/include/pmap.h +++ b/sys/arm/include/pmap.h @@ -708,17 +708,6 @@ extern char *_tmppt; void pmap_postinit(void); -#ifdef ARM_USE_SMALL_ALLOC -void arm_add_smallalloc_pages(void *, void *, int, int); -vm_offset_t arm_ptovirt(vm_paddr_t); -void arm_init_smallalloc(void); -struct arm_small_page { - void *addr; - TAILQ_ENTRY(arm_small_page) pg_list; -}; - -#endif - extern vm_paddr_t dump_avail[]; #endif /* _KERNEL */ diff --git a/sys/arm/include/sf_buf.h b/sys/arm/include/sf_buf.h index fc00cc5..2ec07de 100644 --- a/sys/arm/include/sf_buf.h +++ b/sys/arm/include/sf_buf.h @@ -29,33 +29,10 @@ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ +#include <sys/queue.h> struct vm_page; -#ifdef ARM_USE_SMALL_ALLOC - -#include <vm/vm.h> -#include <vm/vm_param.h> -#include <vm/vm_page.h> - -struct sf_buf; - -static __inline vm_offset_t -sf_buf_kva(struct sf_buf *sf) -{ - return arm_ptovirt(VM_PAGE_TO_PHYS((vm_page_t)sf)); -} - -static __inline vm_page_t -sf_buf_page(struct sf_buf *sf) -{ - return ((vm_page_t)sf); -} - -#else - -#include <sys/queue.h> - struct sf_buf { LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ @@ -78,8 +55,6 @@ sf_buf_page(struct sf_buf *sf) return (sf->m); } -#endif - struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); void sf_buf_free(struct sf_buf *sf); diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h index 93d7587..010834d 100644 --- a/sys/arm/include/vmparam.h +++ b/sys/arm/include/vmparam.h @@ -82,15 +82,15 @@ #define VM_PHYSSEG_DENSE /* - * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool - * from which physical pages are allocated and VM_FREEPOOL_DIRECT is - * the pool from which physical pages for small UMA objects are - * allocated. + * Create two free page pools. Since the ARM kernel virtual address + * space does not include a mapping onto the machine's entire physical + * memory, VM_FREEPOOL_DIRECT is defined as an alias for the default + * pool, VM_FREEPOOL_DEFAULT. */ -#define VM_NFREEPOOL 3 -#define VM_FREEPOOL_CACHE 2 +#define VM_NFREEPOOL 2 +#define VM_FREEPOOL_CACHE 1 #define VM_FREEPOOL_DEFAULT 0 -#define VM_FREEPOOL_DIRECT 1 +#define VM_FREEPOOL_DIRECT 0 /* * we support 2 free lists: @@ -126,23 +126,9 @@ #define UPT_MIN_ADDRESS VADDR(UPTPTDI, 0) #define VM_MIN_ADDRESS (0x00001000) -#ifdef ARM_USE_SMALL_ALLOC -/* - * ARM_KERN_DIRECTMAP is used to make sure there's enough space between - * VM_MAXUSER_ADDRESS and KERNBASE to map the whole memory. - * It has to be a compile-time constant, even if arm_init_smallalloc(), - * which will do the mapping, gets the real amount of memory at runtime, - * because VM_MAXUSER_ADDRESS is a constant. - */ -#ifndef ARM_KERN_DIRECTMAP -#define ARM_KERN_DIRECTMAP 512 * 1024 * 1024 /* 512 MB */ -#endif -#define VM_MAXUSER_ADDRESS KERNBASE - ARM_KERN_DIRECTMAP -#else /* ARM_USE_SMALL_ALLOC */ #ifndef VM_MAXUSER_ADDRESS #define VM_MAXUSER_ADDRESS KERNBASE #endif /* VM_MAXUSER_ADDRESS */ -#endif /* ARM_USE_SMALL_ALLOC */ #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS #define USRSTACK VM_MAXUSER_ADDRESS @@ -176,10 +162,6 @@ VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5) #endif -#ifdef ARM_USE_SMALL_ALLOC -#define UMA_MD_SMALL_ALLOC -#endif /* ARM_USE_SMALL_ALLOC */ - extern vm_offset_t vm_max_kernel_address; #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ |