diff options
author | jhb <jhb@FreeBSD.org> | 2013-07-19 19:06:15 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2013-07-19 19:06:15 +0000 |
commit | d67e7a1cc9054fbcf546edfe5ebc03bb5e29d4ca (patch) | |
tree | 7777baf0c52b0b66567d2147e4ab8ed497fc8e3c /sys/vm/vm_map.h | |
parent | 7dbfd863d4e1dcba1978d736ffc507f0e23eaf26 (diff) | |
download | FreeBSD-src-d67e7a1cc9054fbcf546edfe5ebc03bb5e29d4ca.zip FreeBSD-src-d67e7a1cc9054fbcf546edfe5ebc03bb5e29d4ca.tar.gz |
Be more aggressive in using superpages in all mappings of objects:
- Add a new address space allocation method (VMFS_OPTIMAL_SPACE) for
vm_map_find() that will try to alter the alignment of a mapping to match
any existing superpage mappings of the object being mapped. If no
suitable address range is found with the necessary alignment,
vm_map_find() will fall back to using the simple first-fit strategy
(VMFS_ANY_SPACE).
- Change mmap() without MAP_FIXED, shmat(), and the GEM mapping ioctl to
use VMFS_OPTIMAL_SPACE instead of VMFS_ANY_SPACE.
Reviewed by: alc (earlier version)
MFC after: 2 weeks
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r-- | sys/vm/vm_map.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index a73691d..824a9a0 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -343,9 +343,10 @@ long vmspace_resident_count(struct vmspace *vmspace); */ #define VMFS_NO_SPACE 0 /* don't find; use the given range */ #define VMFS_ANY_SPACE 1 /* find a range with any alignment */ -#define VMFS_ALIGNED_SPACE 2 /* find a superpage-aligned range */ +#define VMFS_OPTIMAL_SPACE 2 /* find a range with optimal alignment*/ +#define VMFS_ALIGNED_SPACE 3 /* find a superpage-aligned range */ #if defined(__mips__) -#define VMFS_TLB_ALIGNED_SPACE 3 /* find a TLB entry aligned range */ +#define VMFS_TLB_ALIGNED_SPACE 4 /* find a TLB entry aligned range */ #endif /* |