Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2001 13:31:46 -0700 (PDT)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Tor.Egge@fast.no
Cc:        arch@FreeBSD.ORG
Subject:   Re: on load control / process swapping
Message-ID:  <200105162031.f4GKVkd77205@earth.backplane.com>
References:  <200105161801.f4GI1Oc73283@earth.backplane.com> <200105162018.WAA99982@midten.fast.no>

next in thread | previous in thread | raw e-mail | index | archive | help

:
:> 
:>     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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105162031.f4GKVkd77205>