Re: Generic PCI IDE bus-mastering DMA support

Zlatko Calusic (Zlatko.Calusic@CARNet.hr)
19 Sep 1997 09:42:17 +0200


"Christian Brunner" <chb@muc.de> writes:

> On Thu, 18 Sep 1997, Zlatko Calusic wrote:
> > +++ linux/drivers/block/ide.c Thu Sep 18 16:41:52 1997
> > @@ -2599,7 +2599,7 @@
> > pcibios_read_config_word (bus, fn, PCI_COMMAND, &command);
> > pcibios_read_config_byte (bus, fn, PCI_LATENCY_TIMER, &lat);
> >
> > - if (lat && (command & PCI_COMMAND_MASTER))
> > +/* if (lat && (command & PCI_COMMAND_MASTER)) */
> > ide_init_triton (bus, fn + func_adj);
> > }
> > #endif /* CONFIG_BLK_DEV_TRITON */
>
> I don't think that this is necessary. This checks for burst DMA
> capability and from your /proc/pci info I can see that you can leave
> the "if" where it is.
>

Well, I nedded it from the beginning, but you figured it up for
yourself later, so there's no point in arguing about that. :)

> > And this is from /proc/pci (for others to compare):
> >
> > Bus 0, device 1, function 1:
> > IDE interface: Silicon Integrated Systems 85C5513 (rev 8).
> > Fast devsel. Master Capable. Latency=64.
> > I/O at 0x0 [0x1].
> > I/O at 0x0 [0x1].
> > I/O at 0x0 [0x1].
> > I/O at 0x0 [0x1].
> > I/O at 0xec70 [0xec71].
>
> You seem to have a very strange BIOS. (wonder why IDE works...)
> It should look like this:
>

Yes, I'm sure there are some problems with that output, but I don't
feel capable to debug that one. My knowledge of PCI is pure.

> It's right, that you don't get a performance increase in respects of
> data transfer. Todays CPUs are fast enough to move the hole data around,
> but you can't do much else while heavy disk access is in progress. With
> DMA support CPU usage goes down form about 80% to 15% on my system.
>

But, of course. I didn't expect my disk to suddenly became twice as
fast as it was. But I *did* expect that CPU usage drop by few
percents. And it really drops while doing read from disk, but writing
is twice as expensive, when using DMA. Maybe I really should put here
some numbers :). So, there we go (results made using 'bonnie'):

(PIO4 mode, no DMA)

-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
100 3648 87.4 5335 43.0 1682 37.2 1667 91.6 4890 69.2 44.0 4.2

(multiword DMA mode 2)

-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
100 3349 93.2 4547 76.4 1808 43.2 1745 92.4 4398 50.9 44.7 1.9

I'm using this line in boot script to set disk parameters:

hdparm -d1 -X34 -u1 -m16 -a16 -A1 -c1 /dev/hda

First two parameters are added recently, of course. :)

Regards,

-- 
Posted by Zlatko Calusic           E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
   The 3 biggest disasters: Hiroshima 45, Tchernobyl 86, Windows 95