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_mmap.c | |
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_mmap.c')
-rw-r--r-- | sys/vm/vm_mmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index c7e22c3..a5e6792 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -1603,7 +1603,8 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, else if (fitit) rv = vm_map_find(map, object, foff, addr, size, object != NULL && object->type == OBJT_DEVICE ? - VMFS_ALIGNED_SPACE : VMFS_ANY_SPACE, prot, maxprot, docow); + VMFS_ALIGNED_SPACE : VMFS_OPTIMAL_SPACE, prot, maxprot, + docow); else rv = vm_map_fixed(map, object, foff, *addr, size, prot, maxprot, docow); |