Subject: Re: NetBSD i386 bounce-buffer non-feature [was Re: Memory leak?]
To: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
From: James Graham - Systems Anarchist <jgraham@defender.VAS.viewlogic.com>
List: current-users
Date: 02/15/1996 10:08:44
[I said]:
* > I think loading the alternate drivers would be preferable since if
* > you have to check a flag every time you attempt a DMAX, you're going
* > to get some performance problems.
*
der Mouse sez:
/*
* Taking the DMA-completion interrupt is far, far more expensive than
* making a single test of a flag. At least on any architecture I've ever
* looked at, which means VAX, 68k, and SPARC off the top of my head. And
* if you're polling for DMA completion, you obviously don't care about
* the performance hit of testing a single flag bit. Not unless you've
* got one king hell of a DMA engine, with memory speeds to match.
Yes, but each test of
if (somestruct.someflag & HAS_DMA) {... }
else {...}
Or even
(((somestruct.someflag & HAS_DMA) &&
retval = do_dma(argv)) ||
retval = do_bounce(argv));
is going to add SOMETHING to a driver. I can't help but think that some-
how it would be a nontrivial expense.
"Of course, I _could_ be wrong..." -- B. Bunny
*
* der Mouse
*
* mouse@collatz.mcrcim.mcgill.edu
*/
--*greywolf;
--
Friends don't let friends use Windows NT.