diff options
author | Robert Noland <rnoland@2hip.net> | 2009-02-23 20:01:26 -0600 |
---|---|---|
committer | Robert Noland <rnoland@2hip.net> | 2009-02-23 20:07:44 -0600 |
commit | a9486ee3a8aaae888b4a05ae0d475cfa2a2641cb (patch) | |
tree | bc43bed55e9595183ba8e5039414d320183ed7df | |
parent | a773ce1db8801fcbbdb55b54172c9cd48b92e2d7 (diff) |
FreeBSD: Set MAP_NOSYNC on mmaps.
There is no reason to gratuitously sync these maps to swap.
-rw-r--r-- | bsd-core/drm_bufs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c index 303b2404..ebc46b5b 100644 --- a/bsd-core/drm_bufs.c +++ b/bsd-core/drm_bufs.c @@ -1050,10 +1050,10 @@ int drm_mapbufs(struct drm_device *dev, void *data, struct drm_file *file_priv) vaddr = round_page((vm_offset_t)vms->vm_daddr + MAXDSIZ); #if __FreeBSD_version >= 600023 retcode = vm_mmap(&vms->vm_map, &vaddr, size, PROT_READ | PROT_WRITE, - VM_PROT_ALL, MAP_SHARED, OBJT_DEVICE, dev->devnode, foff); + VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE, dev->devnode, foff); #else retcode = vm_mmap(&vms->vm_map, &vaddr, size, PROT_READ | PROT_WRITE, - VM_PROT_ALL, MAP_SHARED, SLIST_FIRST(&dev->devnode->si_hlist), + VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, SLIST_FIRST(&dev->devnode->si_hlist), foff); #endif if (retcode) |