Subject: de0/pciide0 performance conflict?
To: None <port-i386@netbsd.org>
From: Allen Briggs <briggs@ninthwonder.com>
List: port-i386
Date: 10/02/1999 10:42:09
I've got two NetBSD/i386 1.4.1 systems with de cards sitting next to
each other on a 100Mbps switch (Bay 350T).  Both are configured to
"media autoselect" and both autoselect "100baseTX full-duplex".

If I ftp base.tgz from A to B, I get 60-65 KB/sec.  If I ttcp from A to B,
I get 7781.5 KB/sec.  If I ftp base.tgz from A to /dev/null on B, I get
3+ MB/sec

If I ftp base.tgz from B to A, I get 4.05 MB/sec.  If I ttcp from B to A,
I get 6669.78 KB/sec.

A - AMD K6/233 - VIA Apollo chipset - de0 100TX/full-duplex
  - Adaptec 2940 wide SCSI disk
B - AMD K6/233 - VIA Apollo chipset - de0 100TX/full-duplex
  - pciide disk (using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers))

Both pretty much idle, but A is busier.  If I transfer from a mac68k
system (10baseT, half-duplex) to B, I get twice the throughput as what
I get from A.

dmesgs from A (CANOLOG) and B (BACKUP) attached.

Is there some kind of DMA contention going on here with the pciide?
If so, is there anything I can do to fix it or tune it?  I think I
started seeing the 
    de0: abnormal interrupt: transmit underflow (raising TX threshold to 96|256)
messages about the same time that pciide changes were made, but I don't
recall if I ever figured out what the deal is on these.  I'd like to
try Jason's new tlp driver, but I'd also like to avoid -current on these
machines...

Any thoughts?
I don't know a whole lot about the PC architecture or PC hardware.

Thanks,
-allen

dmesg for A:
NetBSD 1.4.1 (CANOLOG) #1: Sat Oct  2 09:46:31 EDT 1999
    briggs@backup:/usr/src/sys/arch/i386/compile/CANOLOG
cpu0: family 5 model 6 step 2
cpu0: AMD K6 (586-class)
real mem  = 133824512
avail mem = 121655296
using 1659 buffers containing 6795264 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o enabled, memory enabled
pchb0 at pci0 dev 0 function 0
pchb0: VIA Technologies VT82C597 (Apollo VP3) Host-PCI Bridge (rev. 0x01)
ppb0 at pci0 dev 1 function 0: VIA Technologies VT82C597 (Apollo VP3) PCI-AGP (rev. 0x00)
pci1 at ppb0 bus 1
pci1: i/o enabled, memory enabled
pcib0 at pci0 dev 7 function 0
pcib0: VIA Technologies VT82C586 (Apollo VP) PCI-ISA Bridge (rev. 0x41)
pciide0 at pci0 dev 7 function 1: VIA Technologies VT82C586A IDE Controller
pciide0: device disabled (at device)
VIA Technologies VT82C586 (Apollo VP) Power Management Controller (miscellaneous bridge, revision 0x10) at pci0 dev 7 function 3 not configured
ahc0 at pci0 dev 8 function 0
ahc0: interrupting at irq 9
ahc0: aic7880 Wide Channel, SCSI Id=7, 16 SCBs
scsibus0 at ahc0 channel 0: 16 targets, 8 luns per target
ahc0: target 0 using 16Bit transfers
ahc0: target 0 synchronous at 10.0MHz, offset = 0x8
sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST34555W, 0930> SCSI2 0/direct fixed
sd0: 4340MB, 6300 cyl, 8 head, 176 sec, 512 bytes/sect x 8888924 sectors
ahc0: target 8 using 16Bit transfers
ahc0: target 8 synchronous at 10.0MHz, offset = 0x8
sd1 at scsibus0 targ 8 lun 0: <SEAGATE, ST410800W, 4508> SCSI2 0/direct fixed
sd1: 8669MB, 4926 cyl, 27 head, 133 sec, 512 bytes/sect x 17755614 sectors
vga1 at pci0 dev 9 function 0: Trident Microsystems TGUI 9660 (rev. 0xd3)
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
de0 at pci0 dev 11 function 0
de0: interrupting at irq 11
de0: 21140A [10-100Mb/s] pass 2.2
de0: address 00:40:05:43:1c:39
isa0 at pcib0
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 irq 7
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
opmsprobe: command error
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
apm0 at mainbus0: Power Management spec V1.1
APM power mgmt engage (device 1)
: power management disabled (0x10f)
apm0: A/C state: on
apm0: battery charge state: no battery
biomask 240 netmask a40 ttymask ac2
wscons: wskbd0 glued to wsdisplay0 (console)
boot device: sd0
root on sd0a dumps on sd0b
de0: enabling Full Duplex 100baseTX port
de0: abnormal interrupt: transmit underflow (raising TX threshold to 96|256)
de0: abnormal interrupt: transmit underflow (raising TX threshold to 128|512)

And the dmesg for B:
NetBSD 1.4.1 (BACKUP) #0: Sat Oct  2 01:27:25 EDT 1999
    briggs@backup:/usr/src/sys/arch/i386/compile/BACKUP
cpu0: family 5 model 6 step 2
cpu0: AMD K6 (586-class)
real mem  = 133824512
avail mem = 121663488
using 1659 buffers containing 6795264 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o enabled, memory enabled
pchb0 at pci0 dev 0 function 0
pchb0: VIA Technologies VT82C597 (Apollo VP3) Host-PCI Bridge (rev. 0x01)
ppb0 at pci0 dev 1 function 0: VIA Technologies VT82C597 (Apollo VP3) PCI-AGP (rev. 0x00)
pci1 at ppb0 bus 1
pci1: i/o enabled, memory enabled
pcib0 at pci0 dev 7 function 0
pcib0: VIA Technologies VT82C586 (Apollo VP) PCI-ISA Bridge (rev. 0x41)
pciide0 at pci0 dev 7 function 1: VIA Technologies VT82C586A IDE Controller
pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
wd0 at pciide0 channel 0 drive 0: <IBM-DHEA-36481>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 6197MB, 12592 cyl, 16 head, 63 sec, 512 bytes/sect x 12692736 sectors
wd0: 32-bits data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
pciide0: primary channel interrupting at irq 14
pciide0: secondary channel configured to compatibility mode
pciide0: disabling secondary channel (no drives)
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
VIA Technologies VT83C572 USB Controller (USB serial bus, revision 0x02) at pci0 dev 7 function 2 not configured
VIA Technologies VT82C586 (Apollo VP) Power Management Controller (miscellaneous bridge, revision 0x10) at pci0 dev 7 function 3 not configured
ncr0 at pci0 dev 17 function 0: ncr 53c810a fast10 scsi
ncr0: interrupting at irq 10
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
st0 at scsibus0 targ 2 lun 0: <EXABYTE, EXB-8505, 0051> SCSI2 1/sequential removable
st0: st0(ncr0:2:0): 5.0 MB/s (200 ns, offset 8)
drive empty
vga1 at pci0 dev 18 function 0: Trident Microsystems TGUI 9660 (rev. 0xd3)
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
de0 at pci0 dev 19 function 0
de0: interrupting at irq 9
de0: 21140A [10-100Mb/s] pass 2.2
de0: address 00:40:05:30:c8:52
isa0 at pcib0
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 irq 7
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
opmsprobe: command error
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
isapnp0: no ISA Plug 'n Play devices found
apm0 at mainbus0: Power Management spec V1.1
apm0: A/C state: on
apm0: battery charge state: no battery
biomask 4400 netmask 4600 ttymask 4682
wscons: wskbd0 glued to wsdisplay0 (console)
boot device: wd0
root on wd0a dumps on wd0b
de0: enabling Full Duplex 100baseTX port
de0: abnormal interrupt: transmit underflow (raising TX threshold to 96|256)
de0: abnormal interrupt: transmit underflow (raising TX threshold to 128|512)
de0: abnormal interrupt: transmit underflow (raising TX threshold to 160|1024)
de0: abnormal interrupt: transmit underflow (switching to store-and-forward mode)