X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <41C74B54.B5D1FEDF@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: DMA and PIO (was Re: Problems with timer interrupt chaining and SmartDrv) References: <01c4e368$Blat.v2.2.2$592f6a00 AT zahav DOT net DOT il> <41c5fcca DOT sandmann AT clio DOT rice DOT edu> <01c4e6ce$Blat.v2.2.2$be0d2340 AT zahav DOT net DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 41 Date: Mon, 20 Dec 2004 22:24:56 GMT NNTP-Posting-Host: 12.76.131.45 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1103581496 12.76.131.45 (Mon, 20 Dec 2004 22:24:56 GMT) NNTP-Posting-Date: Mon, 20 Dec 2004 22:24:56 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: >> From: Charles Sandmann >> >> Try this test. Open task manager so you can monitor CPU usage. Using the >> default DMA, read a 500MB file from disk. Using a modern disk this should >> take less than 10 seconds and use no more than 2-3 percent of the CPU. > > What program does one use to read a file, but otherwise do nothing? > > I used a native Windows port of GNU wc, which does some simple and > usually insignificant processing with the file it reads, and it took > it 20 seconds to read a 750MB file, using 20% of CPU. This is on a > 2.8GHz XP box, FWIW. (And yes, "My Computer" does show that DMA is > being used, so sorry for spreading disinformation.) I didn't try to > reboot with PIO. > > By contrast, on a 450MHz Pentium II MMX running Windows 98, where the > (bus-mastering) disk controller uses something called "dual fifo" > instead of DMA, reading a 515MB file via wc took 180 seconds (and the > CPU usage went through the roof). That's a factor of 13 for a sixfold > increase in CPU speed (but I think that we should compare PCI bus > speed, not CPU speed) -- shouldn't a decent DMA speed things up much > more? I used grep to search some 1/2 to 1 megabyte text files on my ancient 486-80 system. I deliberately selected files that had not been accessed for some time, to avoid using any possible caches. The elapsed times ranged from 0.88 to 2.79 seconds. Timing was done by the timer command of 4dos, running in a command window under W98. Repeated runs were generally faster, indicating that there are real cache effects. If there are any cache effects on the drive proper (40G WD 7400 rpm) that does not affect the transfer mechanism. Nothing else is competing for either CPUs nor disk access. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!