Subject: Re: RAW access to files
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 12/12/2001 22:27:55
>> Given that, cp could do the readahead. But do you really want it
>> to? I don't see why it should have to.
> me too
>> What you really want is a way to tell the kernel that buffers filled
>> solely to satisfy this I/O should be aged into oblivion once the I/O
>> completes, so that they are _first_ to be re-used.
> [...] BUT direct I/O mean NO buffers at all = directly read data to
> userspace (NO MEMCPY)
Yes. But it also means no readahead, because there's nowhere to _put_
the readahead. (Unless the application provides such a place, which we
agreed it shouldn't need to do.)
As for the memcpy, I'd rather memcpy from buffers than wait for a disk
transfer - even a transfer that hits the disk's track cache.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B