Subject: Re: pciide performance on alpha
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Matt Thomas <matt@3am-software.com>
List: port-alpha
Date: 08/18/1999 18:31:37
At 07:35 AM 8/12/99 , Manuel Bouyer wrote:
>On Thu, Aug 12, 1999 at 09:30:53AM -0400, Ken Wellsch wrote:
> > I believe Andreas mentioned working with a PC164SX?  I too have an SX.
> > I guess I should have sprung for the extra $$'s and got an LX like all
> > the other alpha folks in-the-know as I too have noted the anemic EIDE
> > performance vs the same drive and OS on an i386 platform (both using plain
> > DMA).  When I moved my IBM drive from my PPro box to my SX box, I "lost"
> > at least 50% and I'd claim 75% on transfer rates, based on bonnie
> > measurements at that time.
> > 
> > If I got off my butt and learned how to tweak the driver maybe I'd corrupt
> > my file-systems, get no better performance, and learn to just shut-up 8-)
> > I was getting 2-3Mb/s as it was (haven't checked recently) and I can
> > boot from the IDE so I can't really complain...
>
>Could someone send me the dmesg for a LX and a SX, so that I can have a
>guess at what is wrong ?
>For the SX, a dmesg with 'wdcdebug_pciide_mask' set to 0x10 can't hurt.

Well, I finally figured what PCIIDE DMA wasn't working.  The V5.1 SRM on
my 164SX sets the bus_master_dma basereg to an address over 0xffff.  The
problem is that the Cypress only looks at the bottom 16 bits.  It brokenly
reports the upper 16bits as what was written instead of 0.  But masking
off the upper 16 bits, I can get PCIIDE DMA to work.

But I only get 3.4MB/s (but at < 1% cpu utilization).  However using a 
IDE->SCSI converter connected to a ncr53c810a with the identical drive, 
I can get > 6MB/s.  Off a 875 I get > 7MB/s (since the 875 still negotiates
at 10MB/s).  Digital UNIX gets > 8MB/s off the same drive (using IDE) 
because it modifies the timing of the drives.

Here a dmesg one for a 164SX:

Copyright (c) 1996, 1997, 1998, 1999 
The NetBSD Foundation, Inc. All rights reserved. 
Copyright (c) 1982, 1986, 1989, 1991, 1993 
The Regents of the University of California. All rights reserved.
NetBSD 1.4J (CENTER2) #1: Wed Aug 18 15:01:48 PDT 1999
matt@center.home.3am-software.com:/other/src/sys/arch/alpha/compile/CENTER2 
Digital AlphaPC 164SX 533 MHz 
8192 byte page size, 1 processor. 
total memory = 128 MB 
(1912 KB reserved for PROM, 126 MB used by NetBSD) 
avail memory = 97152 KB 
using 3229 buffers containing 25832 KB of memory 
mainbus0 (root) 
cpu0 at mainbus0: ID 0 (primary), PCA56-2 (unknown minor type 2) 
cia0 at mainbus0: DECchip 2117x Core Logic Chipset (Pyxis), pass 1 
cia0: extended capabilities: 1<BWEN> 
cia0: using BWX for PCI config access 
pci0 at cia0 bus 0 
pci0: i/o enabled, memory enabled 
ncr0 at pci0 dev 5 function 0: ncr 53c810a fast10 scsi 
ncr0: interrupting at eb164 irq 9 
ncr0: minsync=25, maxsync=206, maxoffs=8, 16 dwords burst, normal dma fifo 
ncr0: single-ended, open drain IRQ driver 
ncr0: restart (scsi reset). 
scsibus0 at ncr0: 8 targets, 8 luns per target 
sd0 at scsibus0 targ 0 lun 0: <QUANTUM, FIREBALL SE8.4A, API.> SCSI2 
0/direct fixed 
sd0(ncr0:0:0): 10.0 MB/s (100 ns, offset 8) 
sd0: 8063 MB, 16383 cyl, 16 head, 62 sec, 512 bytes/sect x 16514063 sectors 
fpa0 at pci0 dev 7 function 0: DEC DEFPA PCI FDDI SAS Controller 
fpa0: FDDI address 08:00:2b:b3:b0:5f, FW=2.46, HW=1, SMT V7.2 
fpa0: FDDI Port = S (PMD = ANSI Multi-Mode) 
fpa0: interrupting at eb164 irq 10 
sio0 at pci0 dev 8 function 0: Contaq Microsystems 82C693 PCI-ISA Bridge 
(rev. 0x00) 
pciide0 at pci0 dev 8 function 1: Contaq Microsystems CY82C693 IDE 
Controller 
pciide0: bus-master DMA support present 
pciide0: primary channel wired to compatibility mode 
wd0 at pciide0 channel 0 drive 0: <ST36422A> 
wd0: drive supports 16-sector pio transfers, lba addressing 
wd0: 6103MB, 13228 cyl, 15 head, 63 sec, 512 bytes/sect x 12500460 sectors 
wd0: 32-bits data port 
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 
cy693_setup_chip: old timings reg 0x6e6e6e6e 
pciide_dma_table_setup: table at 0xfffffc0002160000 len 72, phy 0x2160000 
pciide_dma_table_setup: phy addr of table 0x42160000 
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers) 
cy693_setup_chip: new timings reg 0x2020 
pciide: command/status register=2800005 
pciide1 at pci0 dev 8 function 2: Contaq Microsystems CY82C693 IDE 
Controller 
pciide1: hardware does not support DMA 
pciide1: primary channel wired to compatibility mode 
atapibus0 at pciide1 channel 0 
cd0 at atapibus0 drive 0: <TOSHIBA CD-ROM XM-6202BH, \377\377\377\377, 1112> 
type 5 cdrom removable 
cd0: 32-bits data port 
cd0: drive supports PIO mode 4, DMA mode 2 
cy693_setup_chip: old timings reg 0x6e6e6e6e 
cd0(pciide1:0:0): using PIO mode 4 
cy693_setup_chip: new timings reg 0x2020 
pciide: command/status register=2800005 
Contaq Microsystems 82C693 PCI-ISA Bridge (USB serial bus, interface 0x10) 
at pci0 dev 8 function 3 not configured 
ppb0 at pci0 dev 9 function 0: Digital Equipment DECchip 21152 PCI-PCI 
Bridge (rev. 0x02) 
pci1 at ppb0 bus 2 
pci1: i/o enabled, memory enabled 
ncr1 at pci1 dev 0 function 0: ncr 53c875 fast20 wide scsi 
ncr1: interrupting at eb164 irq 8 
ncr1: minsync=25, maxsync=254, maxoffs=16, 128 dwords burst, large dma fifo 
ncr1: single-ended, open drain IRQ driver, using on-chip SRAM 
ncr1: restart (scsi reset). 
scsibus1 at ncr1: 16 targets, 8 luns per target 
ncr2 at pci1 dev 1 function 0: ncr 53c875 fast20 wide scsi 
ncr2: interrupting at eb164 irq 12 
ncr2: minsync=25, maxsync=254, maxoffs=16, 128 dwords burst, large dma fifo 
ncr2: single-ended, open drain IRQ driver, using on-chip SRAM 
ncr2: restart (scsi reset). 
scsibus2 at ncr2: 16 targets, 8 luns per target 
de1 at pci1 dev 2 function 0 
de1: interrupting at eb164 irq 16 
de1: 21140A [10-100Mb/s] pass 2.2 
de1: address 00:06:2b:00:00:b1 
de1: enabling 10baseT port 
isa0 at sio0 
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo 
com0: console 
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo 
lpt0 at isa0 port 0x3bc-0x3bf irq 7 
pcppi0 at isa0 port 0x61 
spkr0 at pcppi0 
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2 
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec 
mcclock0 at isa0 port 0x70-0x71: mc146818 or compatible 
root on sd0a dumps on sd0b 
root file system type: ffs 
Enter pathname of shell or RETURN for sh: 
Don't login as root, use the su command. 
-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message