Subject: Performance trouble with PCI IDE DMA improvements.
To: None <bouyer@netbsd.org, port-i386@netbsd.org>
From: None <andresk@ibm.net>
List: port-i386
Date: 12/07/1998 20:23:21
Hi,

I have a PCHIPS M570, which is based on the SiS 586 chipset. This M/B does
support ultra-DMA/33. 

I installed the Patch for IDE/ATAPI improvements, that was dated in October
'98. This did not explicitly support the SIS I/F, but did have support for the
Intel PIIX, PIIX3 and PIIX4 controllers and the CMD 0640, and Applo.

This version worked well, even though it did not "support" my PCI controller
directly. Here is an extract of dmesg of the relevant part, and a bonnie output:

NetBSD 1.3.2 (CYBERIAD) #0: Tue Nov 10 22:27:20 SAST 1998
    andre@cyberiad:/usr/src/sys/arch/i386/compile/CYBERIAD
cpu0: family 6 model 0 step 0
cpu0: Cyrix 6x86MX (686-class)
real mem  = 133820416
avail mem = 129421312
using 1659 buffers containing 6795264 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
Silicon Integrated System product 0x5591 (host bridge, revision 0x02) at pci0 de
v 0 function 0 not configured
pciide0 at pci0 dev 0 function 1: Silicon Integrated System product 0x5513 (rev.
 0xd0)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0wdattach
: <ST34520A>
wd0: using 16-sector pio transfers, lba mode
wd0: 4341MB, 9408 cyl, 15 head, 63 sec, 512 bytes/sect x 8890560 sectors
wd0: atap_dmatiming_mimi=120, atap_dmatiming_recom=120
wd0: PIO mode 4, DMA mode 2, UDMA mode 2
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1
cd0 at atapibus0 drive 0: <CREATIVE CD3230E, , PC102> type 5 cdrom removable
cd0: PIO mode 4, DMA mode 2
wdc_atapi_get_params: ATAPI_SOFT_RESET failed for drive pciide0:1:1: error 0x4
pciide_dma_table_setup: table at 0xf0958000 len 136, phy 0x4a0000
pciide_dma_table_setup: phy addr of table 0x4a0000
pciide0:0:0: using DMA mode 2
pciide_dma_table_setup: table at 0xf0959000 len 136, phy 0x4b0000
pciide_dma_table_setup: phy addr of table 0x4b0000
pciide0:1:0: using DMA mode 2
pciide: command/status register=7
Silicon Integrated System 85C503 (ISA bridge, revision 0x01) at pci0 dev 1 funct
ion 0 not configured
Silicon Integrated System product 0x0009 (undefined subclass 0x00) at pci0 dev 1
 function 1 not configured
ppb0 at pci0 dev 2 function 0: Silicon Integrated System 86C201 (rev. 0x00)
pci1 at ppb0 bus 1  
....


root:~# bonnie
File './Bonnie.338', size: 104857600
Writing with putc()...done
Rewriting...done
Writing intelligently...done
Reading with getc()...done
Reading intelligently...done
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
              -------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  6680 94.3 10530 23.9  2842  7.6  6068 92.0 11478 17.4  97.8  2.5
root:~# 

As can be seen, the performance is good. ( I have seen slightly better at
times.)

I then saw the note on the port-i386 list dated 29/11/1998 stating that a new
patch was out that supported the SiS controller. I eagerly installed the patch
on a clean (virgin) sys source. Compiled a new kernel using my config.
Installed and reboot. Everything looked fine and the drever now reported a
Silicon Integrated System 5597/5598 IDE controller. I then ran "bonnie" again,
I noticed it took a little longer. The results showed why;

root:~# bonnie
File './Bonnie.342', size: 104857600
Writing with putc()...done
Rewriting...done
Writing intelligently...done
Reading with getc()...done
Reading intelligently...done
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
              -------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  1848 97.5  2390 92.1  1031  2.7  1829 95.6  2437 90.9  77.2  4.0
root:~# 

It can be seen now that the performance is now terriable! Eeek! Looks like some
timming settings are out. Can you help me? I know that this is "unsupported" by
the project, but I would like to help debug it. Mybe my chip set is wired
differently. Dmesg output follows. (BTW I forgot to configure the sound card in
this build, but I doubt that would have any effect).


Copyright (c) 1996, 1997, 1998
    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.3.2 (CYBERIAD) #0: Mon Dec  7 07:54:37 SAST 1998
    andre@cyberiad:/usr/src/sys/arch/i386/compile/CYBERIAD
cpu0: family 6 model 0 step 0
cpu0: Cyrix 6x86MX (686-class)
real mem  = 133820416
avail mem = 129421312
using 1659 buffers containing 6795264 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
Silicon Integrated System product 0x5591 (host bridge, revision 0x02) at pci0
dev 0 function 0 not configured
pciide0 at pci0 dev 0 function 1: Silicon Integrated System 5597/5598 IDE
controller
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0wdattach
: <ST34520A>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 4341MB, 9408 cyl, 15 head, 63 sec, 512 bytes/sect x 8890560 sectors
wd0: atap_dmatiming_mimi=120, atap_dmatiming_recom=120
wd0: 32-bits data port
wd0: drive supports PIO mode 4, DMA mode 2, UDMA mode 2
pciide0: secondary channel wired to compatibility mode
pciide0: secondary channel ignored (disabled)
sis_setup_chip: old timings reg for channel 0 0xa302
pciide_dma_table_setup: table at 0xf0958000 len 136, phy 0x4a0000
pciide_dma_table_setup: phy addr of table 0x4a0000
sis_setup_chip: new timings reg for channel 0 0x230f
sis_setup_chip: old timings reg for channel 1 0x302
sis_setup_chip: new timings reg for channel 1 0x301
wd0(pciide0:0:0): using PIO mode 4
pciide: command/status register=7
Silicon Integrated System 85C503 (ISA bridge, revision 0x01) at pci0 dev 1
function 0 not configured
Silicon Integrated System product 0x0009 (undefined subclass 0x00) at pci0 dev
1 function 1 not configured
ppb0 at pci0 dev 2 function 0: Silicon Integrated System 86C201 (rev. 0x00)
pci1 at ppb0 bus 1
Texas Instruments product 0x3d07 (VGA display, revision 0x01) at pci1 dev 0
function 0 not configured
ahc0 at pci0 dev 10 function 0
ahc0: interrupting at irq 10
ahc0: aic7850 Single Channel, SCSI Id=7, 3 SCBs
ahc0: Host Adapter Bios disabled.  Using default SCSI device parameters
scsibus0 at ahc0 channel 0: 8 targets
ahc0: target 0 synchronous at 10.0MHz, offset = 0xf
sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST32430N, 0266> SCSI1 0/direct fixed
sd0: 2047MB, 3992 cyl, 9 head, 116 sec, 512 bytes/sect x 4193415 sectors
ahc0: target 4 synchronous at 5.0MHz, offset = 0xf
st0 at scsibus0 targ 4 lun 0: <ARCHIVE, IBM4326NP/RP  !D, 04AP> SCSI2
1/sequential removable
st0: drive empty
ne0 at pci0 dev 11 function 0: Realtek 8029 Ethernet
ne0: Ethernet address 00:00:e8:e0:45:05
ne0: interrupting at irq 9
isa0 at mainbus0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b: polled
npx0 at isa0 port 0xf0-0xff: using exception 16
pc0 at isa0 port 0x60-0x6f irq 1: color
pms0 at pc0 irq 12
spkr0 at pc0 port 0x61
pc0: console
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0 at isa0 port 0x279: read port 0x203
isapnp0: <CMI8330. Audio Adapter, @@@0001, , > port 0x530/8,0x388/8 irq 11 drq
0 not configured
isapnp0: <CMI8330. Audio Adapter, @H@0001, , > port 0x300/2 irq 5 not configured
isapnp0: <CMI8330. Audio Adapter, @P@0001, , > port 0x200/8 not configured
isapnp0: <CMI8330. Audio Adapter, @X@0001, , > port 0x220/16 irq 5 drq 1,5 not
configured
biomask 4440 netmask 4640 ttymask 5642
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
IP Filter: initialized.  Default = pass all, Logging = enabled

Kind Regards,

Andre'

---------------------------------------------
Andre' B. Skarzynski  E-Mail: andresk@ibm.net
                      
9 Pongola Street      Tel:    +27 21 998913
Groenvallei
Bellville 7530        Mobile: +27 82 570 4872
South Africa
---------------------------------------------