From owner-freebsd-arch Wed May 16 13:32:22 2001 Delivered-To: freebsd-arch@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 7075537B42C for ; Wed, 16 May 2001 13:32:19 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.3/8.11.2) id f4GKVkd77205; Wed, 16 May 2001 13:31:46 -0700 (PDT) (envelope-from dillon) Date: Wed, 16 May 2001 13:31:46 -0700 (PDT) From: Matt Dillon Message-Id: <200105162031.f4GKVkd77205@earth.backplane.com> To: Tor.Egge@fast.no Cc: arch@FreeBSD.ORG Subject: Re: on load control / process swapping References: <200105161801.f4GI1Oc73283@earth.backplane.com> <200105162018.WAA99982@midten.fast.no> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :> :> 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. :> :> 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.... : :I've used something like the following patch since FreeBSD 3.3-STABLE. : :On a Dell 2450 machine running a FreeBSD 4.3-RELEASE SMP kernel it :increases idle time from 0% to 95% when running a test program with :100 threads that each reads 256K from random sector aligned locations :in a 10 GB file. Read speed is increased from 120 MB/s to 160 MB/s. : :This implementation is not semantically correct since it doesn't check :for dirty pages in the vm object. Ah, that's right... you were the one working on it. It looks like you've done some serious work on it since the last time we talked. Ok, I've done a quick once-over of the patch and I have a question: What happens if you've just written that file normally and there are still some uncomitted dirty buffers associated with it, and you then do an O_DIRECT read of the file? Do you get the old data or the new data? -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message