Hi!

Trying to kill the keyboard, [EMAIL PROTECTED] produced:
> Wolfgang Weisselberg wrote (in part):

> > Well, not with larger input blocks, but with a couple of megs
> > of data to write held in reserve, there will be less shortages
> > and thus repositionings just because the HD or cpio has a bit
> > of latency ...

> But once cpio (or whatever the program I use that writes to the driver) runs out,
> it needs a lot of cpu and io time to refill its buffer.

No, the picture is
 
 +----+     +------+     +----+
 |cpio| --> |buffer| --> |TAPE|
 +----+     +------+     +----+

cpio can fill the buffer at all times, as fast as cpio runs
(as long as there is space).  The buffer can wait till it's
well filled before writing to the tape.  cpio is much faster
than the tape drive, but the tape drive needs the data fed at
a constant rate --- which is what is done by buffer.  

> This will cause an overrun, of course.

We do have a multi-tasking OS :-)

> > They are 32 Kb long each, aligned at a 32 Kb border.  They are
> > used for DMA.  That's in the docs :-)

> I read that, but somewhere else it suggests that it writes a block of 10240 bytes
> at a time. I have not been able to reconcile these two numbers.

Both are true.  Ftape is fed data in 10Kb chunks, and it uses
3 32Kb DMA buffers to transfer the data from the driver to
the tape (and vice versa) via DMA (Direct Memory Access,
access without the processor having to push all the bytes
around --- which makes it easier on the processor and less
latency endangered[1]).

There is a certain amount of reblocking going on, yes.  But
that is no problem.  dd can do that, buffer can do that, and
ftape can do so, too.  Ftape can even be told it's prefered
input block size --- or even arbitrary block sizes, IIRC.

[1] Imagine a sound being played and the picture being
    moved/changed.  If the picture and the sound need direct
    handling by the processor, slowdowns, pops and jerkiness
    are the result, but you can say to the sound card:
    "Here, play these 64 Kb (Max DMA size IIRC) and send me
    an interrupt when you are done" ... and have about 0.5
    seconds (50 million cycles at 100 MHz) time for other
    jobs, even at CD-quality in stereo. 

-Wolfgang

-- 
             PGP 2 welcome: Mail me, subject "send PGP-key". 
      Unsolicited Bulk E-Mails: *You* pay for ads you never wanted.
   How to dominate the Internet/WWW/etc?  Destroy the protocols!  See:
                 http://www.opensource.org/halloween.html

Reply via email to