diff options
author | 2011-05-24 15:27:36 +0000 | |
---|---|---|
committer | 2011-05-24 15:27:36 +0000 | |
commit | 4e3da9ea5c5c5f4e31e57e65a6f97720cfa2a93f (patch) | |
tree | d9bb5c2f86c9031ede4e5ba19468f965cd1ce33e /sys/dev | |
parent | Merge pf_scrub_ip() and pf_scrub_ip6() into a single function. Call (diff) | |
download | wireguard-openbsd-4e3da9ea5c5c5f4e31e57e65a6f97720cfa2a93f.tar.xz wireguard-openbsd-4e3da9ea5c5c5f4e31e57e65a6f97720cfa2a93f.zip |
Reimplement uvm/uvm_map.
vmmap is designed to perform address space randomized allocations,
without letting fragmentation of the address space go through the roof.
Some highlights:
- kernel address space randomization
- proper implementation of guardpages
- roughly 10% system time reduction during kernel build
Tested by alot of people on tech@ and developers.
Theo's machines are still happy.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index cb8d7069df4..bab8dcd0094 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -1413,10 +1413,9 @@ i915_gem_gtt_map_ioctl(struct drm_device *dev, void *data, * We give our reference from object_lookup to the mmap, so only * must free it in the case that the map fails. */ - addr = uvm_map_hint(curproc, VM_PROT_READ | VM_PROT_WRITE); - ret = uvm_map_p(&curproc->p_vmspace->vm_map, &addr, nsize, &obj->uobj, + ret = uvm_map(&curproc->p_vmspace->vm_map, &addr, nsize, &obj->uobj, offset, 0, UVM_MAPFLAG(UVM_PROT_RW, UVM_PROT_RW, - UVM_INH_SHARE, UVM_ADV_RANDOM, 0), curproc); + UVM_INH_SHARE, UVM_ADV_RANDOM, 0)); done: if (ret == 0) |