summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2001-02-28 04:30:27 +0000
committerdillon <dillon@FreeBSD.org>2001-02-28 04:30:27 +0000
commit951d4c0a1d4404d6967a9c500fcb199dd487ac78 (patch)
tree90abddd674c9c3be0ab8f3c03e2cae9d4339f620 /sys/i386/linux
parent86a16a841cc7398024e514bf7a6fb0c3a5e6ba3f (diff)
downloadFreeBSD-src-951d4c0a1d4404d6967a9c500fcb199dd487ac78.zip
FreeBSD-src-951d4c0a1d4404d6967a9c500fcb199dd487ac78.tar.gz
Linux does not filesystem-sync file-backed writable mmap pages on
a regular basis. Adjust our linux emulation to conform. This will cause more dirty pages to be left for the pagedaemon to deal with, but our new low-memory handling code can deal with it. The linux way appears to be a trend, and we may very well make MAP_NOSYNC the default for FreeBSD as well (once we have reasonable sequential write-behind heuristics for random faults). (will be MFC'd prior to 4.3 freeze) Suggested by: Andrew Gallatin
Diffstat (limited to 'sys/i386/linux')
-rw-r--r--sys/i386/linux/linux_machdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index bb07a27..d1fd21d 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -326,6 +326,8 @@ linux_mmap(struct proc *p, struct linux_mmap_args *args)
bsd_args.flags |= MAP_FIXED;
if (linux_args.flags & LINUX_MAP_ANON)
bsd_args.flags |= MAP_ANON;
+ else
+ bsd_args.flags |= MAP_NOSYNC;
if (linux_args.flags & LINUX_MAP_GROWSDOWN) {
bsd_args.flags |= MAP_STACK;
OpenPOWER on IntegriCloud