Hi all,

after using FreeBSD for many years now, I thought to give OpenBSD a try.
Installed V5.8/i386 on an ALIX board (www.pcengines.ch) in order to build
a X11 client.

Installation went fine so far. But then I noticed that disc performance
is bad and OpenBSD does not enable UDMA4. The system uses a 32GB
CompactFlash card which supports UDMA5. The ALIX board can do UDMA4 but
OpenBSD only enables UDMA2.

I checked against FreeBSD and it looks that 1) FreeBSD enables UDMA4
2) and is about two times faster than OpenBSD.


dmesg, original kernel:

OpenBSD 5.8 (GENERIC) #1066: Sun Aug 16 02:33:00 MDT 2015
    [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 499 
MHz
cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW
real mem  = 232992768 (222MB)
avail mem = 216035328 (206MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 07/19/10, BIOS32 rev. 0 @ 0xfa950
apm0 at bios0: Power Management spec V1.2 (slowidle)
pcibios0 at bios0: rev 2.1 @ 0xf0000/0xdfb4
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/128 (6 entries)
pcibios0: PCI Exclusive IRQs: 5 10 11
pcibios0: no compatible PCI ICU found: ICU vendor 0x1022 product 0x2090
pcibios0: Warning, unable to fix up PCI interrupt routing
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc0000/0x8000 0xc8000/0xa800 0xef000/0x1000!
cpu0 at mainbus0: (uniprocessor)
mtrr: K6-family MTRR support (2 registers)
amdmsr0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x33
vga1 at pci0 dev 1 function 1 "AMD Geode LX Video" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES
vr0 at pci0 dev 13 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 11, address 
00:0d:b9:0f:1a:98
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
athn0 at pci0 dev 14 function 0 "Atheros AR9280" rev 0x01: irq 10
athn0: AR9280 rev 2 (2T2R), ROM rev 22, address 04:f0:21:17:32:91
glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit 
3579545Hz timer, watchdog, gpio, i2c
gpio0 at glxpcib0: 32 pins
iic0 at glxpcib0
pciide0 at pci0 dev 15 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <SDCFXS-032G>
wd0: 1-sector PIO, LBA48, 30535MB, 62537328 sectors

>>> UDMA2 detected:
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2

pciide0: channel 1 ignored (disabled)
auglx0 at pci0 dev 15 function 3 "AMD CS5536 Audio" rev 0x01: irq 11, CS5536 
AC97
ac97: codec id 0x414c4770 (Avance Logic ALC203 rev 0)
ac97: codec features headphone, 20 bit DAC, 18 bit ADC, No 3D Stereo
audio0 at auglx0
ohci0 at pci0 dev 15 function 4 "AMD CS5536 USB" rev 0x02: irq 5, version 1.0, 
legacy support
ehci0 at pci0 dev 15 function 5 "AMD CS5536 USB" rev 0x02: irq 5
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "AMD EHCI root hub" rev 2.00/1.00 addr 1
isa0 at glxpcib0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
com2: irq 5 already in use
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x2e/2: W83627HF rev 0x41
lm1 at wbsio0 port 0x290/8: W83627HF
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "AMD OHCI root hub" rev 1.00/1.00 addr 1
uhidev0 at uhub1 port 4 configuration 1 interface 0 "Logitech 2.4GHz Cordless 
Desktop" rev 2.00/55.01 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub1 port 4 configuration 1 interface 1 "Logitech 2.4GHz Cordless 
Desktop" rev 2.00/55.01 addr 2
uhidev1: iclass 3/1, 6 report ids
ums0 at uhidev1 reportid 1: 8 buttons, Z dir
wsmouse0 at ums0 mux 0
uhid0 at uhidev1 reportid 2: input=2, output=0, feature=0
uhid1 at uhidev1 reportid 3: input=1, output=0, feature=0
uhid2 at uhidev1 reportid 6: input=0, output=0, feature=6
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on wd0a (e00b9c2f0019db9c.a) swap on wd0b dump on wd0b
audio0: different play and record parameters returned by hardware




FreeBSD, 10.1, i386:

  dmesg:
  atapci0: <AMD CS5536 UDMA100 controller> port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 15.2 on pci0
  ...
  ada0 at ata0 bus 0 scbus0 target 0 lun 0
  ada0: <SDCFXS-032G HDX10.05> CFA-0 device
  ada0: Serial Number OAZ072715093110
  ada0: 100.000MB/s transfers (UDMA5, PIO 512bytes)
  ada0: 30535MB (62537328 512 byte sectors: 16H 63S/T 62041C)
  ada0: Previously was known as ad0


  Write:
  dd if=/dev/zero of=bigfile bs=1M count=100
  100+0 records in
  100+0 records out
  104857600 bytes transferred in 2.739116 secs (38281548 bytes/sec)

  Read:
  dd if=bigfile of=/dev/null bs=1M
  100+0 records in
  100+0 records out
  104857600 bytes transferred in 1.771881 secs (59178697 bytes/sec)



OpenBSD, 5.8 GENERIC#0 i386, original kernel:

  Write:
  dd if=/dev/zero of=bigfile bs=1M count=100
  100+0 records in
  100+0 records out
  104857600 bytes transferred in 4.466 secs (23478729 bytes/sec)

  Read:
  dd if=bigfile of=/dev/null bs=1M
  100+0 records in
  100+0 records out
  104857600 bytes transferred in 4.519 secs (23200617 bytes/sec)



Made a test: Disabled the cable check in pciide.c:

   /usr/src/sys/dev/pci/pciide.c, amd756_setup_channel(), line 3383

   /* Check cable */
   if ((chanenable & AMD756_CABLE(chp->channel,
       drive)) == 0 && drvp->UDMA_mode > 2) {
           WDCDEBUG_PRINT(("%s(%s:%d:%d): 80-wire "
               "cable not detected\n", drvp->drive_name,
               sc->sc_wdcdev.sc_dev.dv_xname,
               chp->channel, drive), DEBUG_PROBE);

           // XXX, 01.02.2016, ME TEST don't fall back to UDMA2
           // drvp->UDMA_mode = 2;

   }


The modified kernel claims to work in UDMA4 now:

  ...
  wd0 at pciide0 channel 0 drive 0: <SDCFXS-032G>
  wd0: 1-sector PIO, LBA48, 30535MB, 62537328 sectors
  wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
  pciide0: channel 1 ignored (disabled)


Read/Write performace is not really better, modified kernel:

  Write:
  dd if=/dev/zero of=bigfile bs=1M count=100
  100+0 records in
  100+0 records out
  104857600 bytes transferred in 4.417 secs (23738321 bytes/sec)

  Read:
  dd if=bigfile of=/dev/null bs=1M
  100+0 records in
  100+0 records out
  104857600 bytes transferred in 3.697 secs (28355549 bytes/sec)


Any ideas ? Is there anything I do wrong ? Wrong expectations ?

Also tried to set PIO to 0 with flags = 0xc88 but no change.

Kind regards

Michael



Reply via email to