From owner-freebsd-hackers Tue May 14 15:54:36 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA18527 for hackers-outgoing; Tue, 14 May 1996 15:54:36 -0700 (PDT) Received: from brasil.moneng.mei.com (brasil.moneng.mei.com [151.186.109.160]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id PAA18521; Tue, 14 May 1996 15:54:32 -0700 (PDT) Received: (from jgreco@localhost) by brasil.moneng.mei.com (8.7.Beta.1/8.7.Beta.1) id RAA11225; Tue, 14 May 1996 17:54:01 -0500 From: Joe Greco Message-Id: <199605142254.RAA11225@brasil.moneng.mei.com> Subject: A question for the VM gurus..! To: hackers@freebsd.org Date: Tue, 14 May 1996 17:54:01 -0500 (CDT) Cc: dyson@freebsd.org X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Summary: curious about the status of madvise/mincore. A quick find /usr/src/sys -type f -print | xargs grep MADV reveals that the MADV constants aren't used anywhere in the kernel (at least on my 2.1R systems). I see madvise and mincore return EOPNOTSUPP. Do we have any plans to support this, for those of us who would prefer to keep our VM systems more informed? For example, under certain conditions, I would like to map a very large file, and access portions in a random (but not necessarily in sequence) fashion. Without faulting, because I have a monolithic server process, that _could_ be servicing somebody else right now, even if I can't access _this_ bit of data yet. :-) I can do this if I can use madvise() to tell the system, MADV_WILLNEED, and then poll with mincore() every so often to see if the page is available yet (and of course I can take the fault hit if I get tired of waiting too long). Or, I would like to defeat caching of file data that I _know_ has an extremely low probability of being hit again within a useful timeframe (MADV_DONTNEED), in order to help increase the likelihood of very _useful_ data still being in the cache. (think: "news server"). One answer is to get more RAM and lock everything I really want in memory. That is echhhhy given the amount of RAM I would have to buy. It would be much cooler if I could just drop hints to the VM system like I can on Slowaris. I realize that there is no _guarantee_ that any OS has to listen to the hints, but it has a tendency to make certain programs more efficient, particularly when dealing with large amounts of data on systems with moderate resources. ... Joe ------------------------------------------------------------------------------- Joe Greco - Systems Administrator jgreco@ns.sol.net Solaria Public Access UNIX - Milwaukee, WI 414/546-7968