summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.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_page.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_page.h')
-rw-r--r--sys/vm/vm_page.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index 0cfc618..c5d2827 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -234,6 +234,7 @@ extern struct vpgqueues vm_page_queues[PQ_COUNT];
#define PG_REFERENCED 0x0080 /* page has been referenced */
#define PG_CLEANCHK 0x0100 /* page will be checked for cleaning */
#define PG_SWAPINPROG 0x0200 /* swap I/O in progress on page */
+#define PG_NOSYNC 0x0400 /* do not collect for syncer */
/*
* Misc constants.
@@ -437,10 +438,9 @@ vm_page_unhold(vm_page_t mem)
/*
* vm_page_protect:
*
- * Reduce the protection of a page. This routine never
- * raises the protection and therefore can be safely
- * called if the page is already at VM_PROT_NONE ( it
- * will be a NOP effectively ).
+ * Reduce the protection of a page. This routine never raises the
+ * protection and therefore can be safely called if the page is already
+ * at VM_PROT_NONE (it will be a NOP effectively ).
*/
static __inline void
OpenPOWER on IntegriCloud