From owner-freebsd-hackers Wed Dec 8 14:50:39 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from users.anet-stl.com (users.anet-stl.com [209.145.150.20]) by hub.freebsd.org (Postfix) with ESMTP id 14876152C0 for ; Wed, 8 Dec 1999 14:50:07 -0800 (PST) (envelope-from doogie@anet-stl.com) Received: from earth.anet-stl.com (earth.anet-stl.com [209.83.128.12]) by users.anet-stl.com (8.9.3/8.8.5) with SMTP id QAA18385; Wed, 8 Dec 1999 16:49:55 -0600 (CST) Date: Wed, 8 Dec 1999 16:49:54 -0600 (CST) From: Jason Young To: Matthew Dillon Cc: Alfred Perlstein , freebsd-hackers@FreeBSD.ORG Subject: Re: Getting a new MAP_ flag into mmap() prior to 4.x freeze In-Reply-To: <199912082238.OAA43939@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I think that you imply explicit msync() calls still flush data to disk. Is that the case? Jason Young accessUS Chief Network Engineer On Wed, 8 Dec 1999, Matthew Dillon wrote: > :I'd like to see this happen, go for it! :) > : > :Don't forget how getnewbuf refils the buffers though, it will need to > :somehow to communicate to the syncer to disregard MAP_NOSYNC during a > :shortage... ? :) > : > :-Alfred > > No, I don't bother with that. If there is a filesystem buffer associated > with a dirty page the NOSYNC is ignored. The only time a filesystem > buffer can be associated with a NOSYNC page is if you write(). In that > case we allow the normal filesystem mechanisms to handle it. > > The tie-in is really trivial -- there is essentially one procedure which > the object code calls to synchronize a range and it is comprised of two > parts: Collecting dirty pages and constructing filesystem buffers > for them, and flushing out filesystem buffers. > > NOSYNC simply prevents the first part from occuring for normal > asynchronous flushes. The second part thus nevers sees the pages unless > some other command indirectly associates them with a buffer -- like write() > does for example. > > For low-memory situations we let the pagedaemon handle things. The > pagedaemon ignores the NOSYNC flag. That is, NOSYNC space is treated > just the same as swap-backed memory is treated - pageed only when > necessary. > > -Matt > Matthew Dillon > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message