From owner-freebsd-arch Wed May 16 11:11: 2 2001 Delivered-To: freebsd-arch@freebsd.org Received: from superconductor.rush.net (superconductor.rush.net [208.9.155.8]) by hub.freebsd.org (Postfix) with ESMTP id 6952037B424 for ; Wed, 16 May 2001 11:10:56 -0700 (PDT) (envelope-from bright@superconductor.rush.net) Received: (from bright@localhost) by superconductor.rush.net (8.11.2/8.11.2) id f4GIAir28578; Wed, 16 May 2001 14:10:44 -0400 (EDT) Date: Wed, 16 May 2001 14:10:43 -0400 From: Alfred Perlstein To: Matt Dillon Cc: Rik van Riel , Charles Randall , Roger Larsson , arch@FreeBSD.ORG, linux-mm@kvack.org, sfkaplan@cs.amherst.edu Subject: Re: on load control / process swapping Message-ID: <20010516141042.I12365@superconductor.rush.net> References: <200105161714.f4GHEFs72217@earth.backplane.com> <20010516135707.H12365@superconductor.rush.net> <200105161801.f4GI1Oc73283@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0us In-Reply-To: <200105161801.f4GI1Oc73283@earth.backplane.com>; from dillon@earth.backplane.com on Wed, May 16, 2001 at 11:01:24AM -0700 X-all-your-base: are belong to us. Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Matt Dillon [010516 14:01] wrote: > > I think someone tried to implement O_DIRECT a while back, but it > was fairly complex to try to do away with caching entirely. > > I think our best bet to 'start' an implementation of O_DIRECT is > to support the flag in open() and fcntl(), and have it simply > modify the sequential detection heuristic to throw away pages > and buffers rather then simply depressing their priority. yes, as i said: > :A simple solution would involve passing along flags such that if > :the IO occurs to a non-previously-cached page the buf/page is > :immediately placed on the free list upon completion. That way the > :next IO can pull the now useless bufferspace from the freelist. > : > :Basically you add another buffer queue for "throw away" data that > :exists as a "barely cached" queue. This way your normal data > :doesn't compete on the LRU with non-cached data. > > Eventually we can implement the direct-I/O piece of the equation. > > I could do this first part in an hour, I think. When I get home.... Thank you. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message