From owner-freebsd-hackers Wed May 15 10:15:18 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA05671 for hackers-outgoing; Wed, 15 May 1996 10:15:18 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id KAA05664; Wed, 15 May 1996 10:15:14 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.7.5/8.6.9) id MAA22723; Wed, 15 May 1996 12:14:47 -0500 (EST) From: "John S. Dyson" Message-Id: <199605151714.MAA22723@dyson.iquest.net> Subject: Re: A question for the VM gurus..! To: jgreco@brasil.moneng.mei.com (Joe Greco) Date: Wed, 15 May 1996 12:14:47 -0500 (EST) Cc: dyson@freebsd.org, hackers@freebsd.org In-Reply-To: <199605151445.JAA12093@brasil.moneng.mei.com> from "Joe Greco" at May 15, 96 09:45:08 am X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > Not portable. Solaris, at least, implements the madvise() stuff.. > Okay.. > > What it seems to do: > > If you set MADV_SEQUENTIAL on a region, if it has to fault a page "n" in, it > looks like it discards all pages from 0 to n-1 in that region.. notably it > does NOT seem to do anything if it doesn't have to fault a page in. > Is there only one process accessing the region? What happens if there are other processes using that region also? Otherwise, that is easy to do in our VM system. > > MADV_RANDOM seems to cause a lot more faults if you are doing sequential > accesses, as far as I can tell it just tells Solaris not to read ahead. > That is easy also. > > MADV_DONTNEED appears to junk pages (asynchronously, from what I can tell) > Easy. > > MADV_WILLNEED appears to fault pages (again, asynchrnously, from what I can > tell). > Hmmm... time to implement kernel threads. > > I guess in the _short_ term I am most interested in support for > MADV_DONTNEED, it is the most generally useful change for my application. > However, it would be nice to have a full suite of this stuff in the future. > Okay, I'll work on it this weekend. Probably implement everything except WILLNEED, and will give WILLNEED lip-service by making sure all of the pages are activated (and perhaps mapped), if they are already in memory. I will work on it this weekend or soon thereafter. John