Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!amdahl!pacbell!belltec!jim From: jim@belltec.UUCP (Mr. Jim's Own Logon) Newsgroups: comp.sys.ibm.pc Subject: Re: Ethernet cards for an IBM PC Summary: IBM DMA and why not. Message-ID: <242@belltec.UUCP> Date: 15 Jul 88 14:38:45 GMT References: <4424@sphinx.uchicago.edu> <239@belltec.UUCP> <291@bby-bc.UUCP> Organization: Bell Technologies, Fremont, CA Lines: 45 In article <291@bby-bc.UUCP>, john@bby-bc.UUCP (john) writes: > > Why is dma not advisable for unix? > > I would have thought the reverse - dma not being worthwhile for dos but > a real win for unix!? > > john > ...ubc-cs!fornax!bby-bc!john First we'll agree on terms. Direct Memroy Access can refer to anything from a multi-master CPU access to a hardware aided I/O to memory transfer. The IBM use of the term is using the 8237 DMA chips to transfer a byte or word from/to a I/O device to/from a Memory space. This is significant subset of "DMA", but as long as we all know what we are talking about... O.K., there are two issues: the DMA transfer speed, and the way that UNIX handles data. Speed first, the time for a single DMA transfer on a 10 MHZ bus PC is about 2.5 microseconds (this is the time that the bus has been allocated to the 8237). During this time no CPU cycles take place. Compare this with the time to do a memory to memory transfer: 480 nsec. The goal is to load the CPU down as little as possible, even though the DMA doesn't use CPU instructions, it slows down much more than having the packet stored remotely, and then block transfered memory to memory. The second issue is UNIX data handling, beyond my direct knowledge, but I've had it verified several times in several places. UNIX moves data around a fair amount, there are application memory spaces and driver memory spaces, and a few more that I'm sure exist. In a DMA system, you will DMA the data to the driver space. And then later will do a memory to memory transfer to move it to an application space. In a dual port memory case, you would define the driver space as the dual port memory, and then it would be moved directly to the application space. Don't ask me why you don't just move it to the final location directly; I don't know. So, as long as you are going to move the data anyway; you are better off doing away entirely with the DMA transfer. Best method of all are intelligent cards that have the ability to become bus masters, but not on a PC thank you. There are sceondary issues such as data overrun, and limited numbers of DMA channels, but the two described are the main issues. -Jim Wall Bell Technologies Inc.