From owner-freebsd-hackers Wed Dec 8 14:38:53 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 667E2151F5 for ; Wed, 8 Dec 1999 14:38:50 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id OAA43939; Wed, 8 Dec 1999 14:38:48 -0800 (PST) (envelope-from dillon) Date: Wed, 8 Dec 1999 14:38:48 -0800 (PST) From: Matthew Dillon Message-Id: <199912082238.OAA43939@apollo.backplane.com> To: Alfred Perlstein Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Getting a new MAP_ flag into mmap() prior to 4.x freeze References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :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