summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.h
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-12-12 03:19:33 +0000
committerdillon <dillon@FreeBSD.org>1999-12-12 03:19:33 +0000
commitb66fb2c64801a0ee59e638561bfd8d3fe36b647c (patch)
treed1cf00b34925743e2181910ae5e72af2d03be373 /sys/vm/vm_map.h
parentaeee88b81a6982928d45c0d80c325cd8372bbab0 (diff)
downloadFreeBSD-src-b66fb2c64801a0ee59e638561bfd8d3fe36b647c.zip
FreeBSD-src-b66fb2c64801a0ee59e638561bfd8d3fe36b647c.tar.gz
Add MAP_NOSYNC feature to mmap(), and MADV_NOSYNC and MADV_AUTOSYNC to
madvise(). This feature prevents the update daemon from gratuitously flushing dirty pages associated with a mapped file-backed region of memory. The system pager will still page the memory as necessary and the VM system will still be fully coherent with the filesystem. Modifications made by other means to the same area of memory, for example by write(), are unaffected. The feature works on a page-granularity basis. MAP_NOSYNC allows one to use mmap() to share memory between processes without incuring any significant filesystem overhead, putting it in the same performance category as SysV Shared memory and anonymous memory. Reviewed by: julian, alc, dg
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r--sys/vm/vm_map.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index b02f970..b02317b 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -112,7 +112,7 @@ struct vm_map_entry {
vm_pindex_t lastr; /* last read */
};
-#define MAP_ENTRY_UNUSED_01 0x1
+#define MAP_ENTRY_NOSYNC 0x1
#define MAP_ENTRY_IS_SUB_MAP 0x2
#define MAP_ENTRY_COW 0x4
#define MAP_ENTRY_NEEDS_COPY 0x8
@@ -329,6 +329,7 @@ vmspace_resident_count(struct vmspace *vmspace)
#define MAP_NOFAULT 0x4
#define MAP_PREFAULT 0x8
#define MAP_PREFAULT_PARTIAL 0x10
+#define MAP_DISABLE_SYNCER 0x20
/*
* vm_fault option flags
OpenPOWER on IntegriCloud