[399] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: Reading more than buffersize

daemon@ATHENA.MIT.EDU (Drew Eckhardt)
Wed Jul 19 02:24:18 1995

To: eric@aib.com (Eric Youngdale)
cc: mucci@cs.utk.edu, linux-scsi@vger.rutgers.edu
In-reply-to: Your message of "Tue, 18 Jul 1995 00:53:00 EDT."
             <m0sY4ej-0009UtC@aib.com> 
Date: Tue, 18 Jul 1995 16:31:01 -0600
From: Drew Eckhardt <drew@poohsticks.org>

In message <m0sY4ej-0009UtC@aib.com>, eric@aib.com writes:
>
>>One difficult bit is maintaining synchronicity with the buffer 
>>cache in a way that's compatable with performance.  If you do a single 
>>direct read/write, it would probably be optimal to just set your pages 
>>to COW and give them a context in the buffer cache as wll. 
>
>	This talk of 0-copy block devices makes me wonder whether the
>correct place to implement something like this would be in the
>filesystem rather than the device driver.  

We're thinking of two different but related issues here :

	0-copy raw devices (for databases, SCSI generics with scannters, etc)

	0-copy transfers through the file system; ala SGI's O_DIRECT

in both cases, we have to worry about locking the relevant pages down
in memory so they don't move out from underneath you, and also need to 
make sure the right magic happens when those pages are being shared with
other processes (ie, SYSV shared memory with a two process, double buffering
dd).  

0-copy raw devices will call this common code from sd.c or whatever;
O_DIRECT will call that code from sysread/syswrite with some auxiliary
support in each filesystem we're interested in.


home help back first fref pref prev next nref lref last post