From owner-cvs-all Wed Feb 28 2:15:18 2001 Delivered-To: cvs-all@freebsd.org Received: from syncopation-03.iinet.net.au (syncopation-03.iinet.net.au [203.59.24.49]) by hub.freebsd.org (Postfix) with SMTP id 5DB9C37B718 for ; Wed, 28 Feb 2001 02:15:02 -0800 (PST) (envelope-from julian@elischer.org) Received: (qmail 1909 invoked by uid 666); 28 Feb 2001 10:26:50 -0000 Received: from i076-199.nv.iinet.net.au (HELO elischer.org) (203.59.76.199) by mail.m.iinet.net.au with SMTP; 28 Feb 2001 10:26:50 -0000 Message-ID: <3A9CCF9D.2BCD765C@elischer.org> Date: Wed, 28 Feb 2001 02:14:53 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Akinori MUSHA Cc: Matt Dillon , sanpei@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/linux linux_machdep.c References: <200102280430.f1S4UST14589@freefall.freebsd.org> <86u25fxoky.wl@archon.local.idaemons.org> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Akinori MUSHA wrote: > > At Tue, 27 Feb 2001 20:30:28 -0800 (PST), > dillon wrote: > > dillon 2001/02/27 20:30:28 PST > > > > Modified files: > > sys/i386/linux linux_machdep.c > > Log: > > 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 > > How does it compare to the attached patch which came up in the > FreeBSD-users-jp mailing list in Japan some time ago? basically the same patch but the japanese one is more flexible.. who wrote this patch?. they obviously have a clue or two.. :-) what was the problem they were solving? > > It gives users an option to switch the behavior via sysctl(8), and > does <> in a different place. > > The patch was originally posted by sanpei@FreeBSD.org, and is > mentioned in Hints.FreeBSD of the vmware2 port, FYI. > > -- > / > /__ __ Akinori.org / MUSHA.org > / ) ) ) ) / FreeBSD.org / Ruby-lang.org > Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp > > "We're only at home when we're on the run, on the wing, on the fly" > > --- sys/i386/linux/linux_machdep.c 2001/02/16 16:40:43 1.12 > +++ sys/i386/linux/linux_machdep.c 2001/02/27 15:37:29 > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -288,6 +289,11 @@ > int pos; > }; > > +static int mmap_nosync; > +SYSCTL_DECL(_compat_linux); > +SYSCTL_INT(_compat_linux, OID_AUTO, mmap_nosync, CTLFLAG_RW, > + &mmap_nosync, 0, "mmap files with MAP_NOSYNC flag in Linux mode."); > + > #define STACK_SIZE (2 * 1024 * 1024) > #define GUARD_SIZE (4 * PAGE_SIZE) > > @@ -395,8 +401,11 @@ > bsd_args.prot = linux_args.prot | PROT_READ; /* always required */ > if (linux_args.flags & LINUX_MAP_ANON) > bsd_args.fd = -1; > - else > + else { > bsd_args.fd = linux_args.fd; > + if (mmap_nosync) > + bsd_args.flags |= MAP_NOSYNC; > + } > bsd_args.pos = linux_args.pos; > bsd_args.pad = 0; > -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message