[comp.sys.amiga] Question on hard-drive interfaces.

scroll@beach.cis.ufl.edu (Steve Croll) (10/16/89)

    In the next few months I will be purchasing an Amiga 2000 along
    with a hard-drive interface.  My question is whether the interface
    should be DMA or non-DMA.  I assume a DMA interface would be more
    efficient on a multitasking system.  Raw transfer speed by itself
    is not necessarily good if it eats all the CPU's cycles (and
    leaving little for other programs running in the system).
    
    A few days ago I was talking with a dealer in the St. Petersburg
    (Florida) area.  He strongly recommended I should NOT buy a DMA
    interface for the following reasons:
    
        * It can be very slow during high DMA activity (such as having
          a high-res interlaced 16-color screen).
          
        * It can cause the machine to "lock-up" (be trapped in an
          infinite loop) during high DMA activity.  He described an
          example on an Amiga 2500 running Deluxe Paint.  He said that
          in a high-res interlaced 16 color screen, the machine will be
          "stuck" in an infinite loop if you tried to save the current
          screen to hard disk.  He said the only way around this is to
          quickly switch screens using the left-Amiga-n combination
          right after "save" was selected.  He also said he had
          similar troubles with other (unnamed) DMA interfaces.
          
        * Commodore has verified the above "lock-up" problem and
          correspondingly their new interface will NOT do DMA.  He
          cited Supra Corporation's decision to move from a DMA
          to a non-DMA type interface.  
          
    How much of the above is true?  I know Commodore's 2090(A)
    controllers are horribly slow when there is high DMA activity, but
    from what I have heard it is attributed to "poor" design rather
    than an inherent flaw in "doing" hard-disk DMA on an Amiga.  Is
    there really such a problem with DMA style interfaces?
    
    Thank you for your time.
    
    

    
--
--
Steve Croll (email: scroll@beach.cis.ufl.edu  home: 904-373-8389)

ccplumb@rose.waterloo.edu (Colin Plumb) (10/16/89)

In article <21058@uflorida.cis.ufl.EDU> scroll@beach.cis.ufl.edu () writes:
>    A few days ago I was talking with a dealer in the St. Petersburg
>    (Florida) area.  He strongly recommended I should NOT buy a DMA
>    interface for the following reasons:

There is some truth to what he's saying, but it seems to have been
stretched a bit.

>        * It can be very slow during high DMA activity (such as having
>          a high-res interlaced 16-color screen).

Since 4 bitplanes high resolution eats *all* the available chip RAM bandwidth,
except during horizontal and vertical retrace, all accesses to chip RAM
are *very* slow while such a screen is up.  Even the copper can get locked
out.  The Commodore 2090 and 2090A controllers have a problem with this,
as they assume the limiting bandwidth is the disk interface and their
(64-byte?) FIFOs will provide enough buffering to cover any bus contention.
If you're doing DMA to chip RAM while such a screen is active, they don't
stop asking the drive for data but overflow the buffer.  Bad.

(Note that this only applies to *chip* RAM, including C00000 memory; you can
access fast RAM at full speed in any video mode.  Anything over 2 bitplanes
high (640 pixels across) resolution or 4 bitplanes low (320 pixels) resolution
interferes with other access to chip ram to some degree, but you have to double
those numbers to achieve the near-total lockout that gives some DMA controllers
headaches.)

>        * It can cause the machine to "lock-up" (be trapped in an
>          infinite loop) during high DMA activity.  He described an
>          example on an Amiga 2500 running Deluxe Paint.  He said that
>          in a high-res interlaced 16 color screen, the machine will be
>          "stuck" in an infinite loop if you tried to save the current
>          screen to hard disk.  He said the only way around this is to
>          quickly switch screens using the left-Amiga-n combination
>          right after "save" was selected.  He also said he had
>          similar troubles with other (unnamed) DMA interfaces.

What happens is the software ends up retrying a lot.  Usually, it eventually
gets through.  If you add overscan, and the software isn't smart enough to
give up eventually, I could imagine getting an infinite loop, but I don't
believe this could lock out intuition to the point where you couldn't at any
point move the screen to the back.

If your dealer can show you a locked-up machine, I'll change my opinion and
yell at Commodore for screwing something up badly.  But I'd bet against it.

More buffering, or just not asking the SCSI bus for bytes when the on-board
buffer is full, will fix the problem.  Note that it'll still be awfully
slow (<100K/sec DiskPerf, very likely), but won't have to retry, and non-DMA
would have the same penalty.

>        * Commodore has verified the above "lock-up" problem and
>          correspondingly their new interface will NOT do DMA.  He
>          cited Supra Corporation's decision to move from a DMA
>          to a non-DMA type interface.  

Apparently it's solved in the 590 and 2091 (which is the 590 on a Zorro-II
card), and I've heard that there's a patch to the 2090 driver software
that will ameliorate the problem.

I do not know this first-hand, but I do know that unless something in the
system in badly messed up (and on Amy it's not), DMA is inherently faster
than non-DMA, *in all circumstances* and any marketing hype to the
contrary is ignorable.  Obviously, it's possible to screw up anything,
but "if we built a DMA interface, it would be slower" unless with a caveat
about price (bang-per-buck can involve some unusual solutions) means
they have incompetent engineers.
-- 
	-Colin