Subject: disk performance on my new Athlon64 3500+: half fixed
To: None <port-amd64@NetBSD.ORG>
From: Anne Bennett <anne@porcupine.montreal.qc.ca>
List: port-amd64
Date: 01/02/2006 13:49:51
Summary of question: is support planned for the "ATI Technologies
                     product 0x4379" serial ATA disk controller?


Hello, folks.

I'm a new amd64 user as of this week (bought a refurbished HP
Pavilion, based on the Athlon64 3500+), but I've used other ports
(mostly i386) in the past.

There are two hard drives in this new computer, the ST3250823AS
serial ATA disk that came with it, and a Maxtor IDE disk that I
added.  Initially, performance on both was awful (approx 1MB/sec
transfers), and the use of either disk tied up the CPU with interrupts
(according to "top", >98% of CPU time handling interrupts!).

After reading the boot messages carefully, and comparing to similar
ones from an i386 kernel, I saw that both of the disk controllers in
question were listed as having "bus-master DMA support present, but u
nused (no driver support)" by amd64, but one of the controllers *had*
DMA support on the i386.  I was able to add this device to the amd64
kernel:
  ixpide* at pci? dev ? function ?        # ATI IXP IDE controllers
and now my IDE disk is normal (<3% CPU time in interrupts, can
transfer 20MB/s read and write simultaenously).  Woo-hoo!  :-)


However, still no luck on the serial ATA drive, where the kernel has
to fall back to its vanilla PCI IDE driver and doesn't use DMA:

   pci0 at mainbus0 bus 0: configuration mode 1
   pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
   [...]
   pciide1 at pci0 dev 18 function 0
   pciide1: ATI Technologies product 0x4379 (rev. 0x00) 
   pciide1: bus-master DMA support present, but unused (no driver support)
   pciide1: primary channel configured to native-PCI mode
   pci_intr_map: bus 0 dev 18 func 0 pin 1; line 11
   pci_intr_map: no MP mapping found
   pciide1: using irq 11 for native-PCI interrupt
   atabus2 at pciide1 channel 0
   pciide1: secondary channel configured to native-PCI mode
   [...]
   wd0 at atabus2 drive 0: <ST3250823AS>
   wd0: drive supports 16-sector PIO transfers, LBA48 addressing
   wd0: 232 GB, 484521 cyl, 16 head, 63 sec, 512 bytes/sect x 488397168 sectors
   wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)

I tried a kernel with the "use DMA anyway" flag set:
  pciide* at pci? dev ? function ? flags 0x0001
but it crashed during boot.  No surprise.

Interestingly, my companion, who bought an identical machine and
is running Slackware Linux on it, has poor performance on his IDE
disk but good performance on the serial ATA disk - which suggests
that someone in the free software world has written a driver for
that controller, which is encouraging.  Sadly, the Linux boot
messages are relatively uninformative - but since I'm no kernel
hacker, I might not be able to make sense of them anyway.

So... is anyone out there up for adding a driver for this "ATI
Technologies product 0x4379" controller?

I should add that I'm using NetBSD-3.0 release.  "uname -a" output:
  NetBSD newquill.porcupine.montreal.qc.ca 3.0 NetBSD 3.0 (QUILL_AMD64)
    #0: Mon Jan  2 12:00:05 EST 2006
    root@newquill.porcupine.montreal.qc.ca:/disks/nobak/netbsd/netbsd-3.0/src/sys/arch/amd64/compile/QUILL_AMD64
    amd64



Anne.
-- 
Ms. Anne Bennett, as a private citizen:  anne@porcupine.montreal.qc.ca
Also reachable more officially at work:  anne@encs.concordia.ca