Re: dynamic partitions

Erik Corry (erik@arbat.com)
Sun, 18 May 1997 13:56:30 +0200 (MET DST)


Jan Kratochvil wrote:
> P.S.: When we're at another large memory copying, will someone the write page
> flipping support so that during CD burn the data will no longer be copied
> 6 times? Count with me:
>
> [disk DMA->kernel buffer]
> 1. buffer -> userland mkisofs
> 2. mkisofs -> kernel pipe buffer
> 3. kernel pipe buffer -> userland buffering tool
> [>10MB buffer to deal with starvations during compiles]
> 4. userland buffering tool -> kernel pipe buffer
> 5. kernel pipe buffer -> userland cdrecord buffer
> 6. userland cdrecord buffer -> scsi layer buffer
> [scsi layer->scsi controller DMA]

To get this to work better, you could:
1) Use a ring buffer in shared memory instead of pipes for the
"userland buffering tool".
2) Use the new raw devices for the disk image of the CDROM when they
become available from Dave Miller.
3) Modify the Generic SCSI driver so it can point to a data buffer
(or a chain of them) in user-land for read/writes instead of
mixing up commands and data in one non-aligned io block. Not
sure what the consequences are here if you give the generic
SCSI driver a memory area that doesn't belong to you ie it
'seg faults' in the DMA.

Then you get:

1. DMA raw partition -> ring buffer in shared memory.
2. DMA ring buffer in shared memory -> SCSI card with CD writer.

This is assuming that data gets copied verbatim from the disk
to the CDROM.

Of course, the ideal would be to DMA directly from the disk
to the CD across the PCI bus. Hey they might be on the same
SCSI controller, then the data never has to leave the
controller... :-).

-- 
Erik Corry erik@arbat.com http://inet.uni-c.dk/~ehcorry/