Subject: port-i386/33585: piixide interrupt thrashing on SATA interface
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <abrasive@axdf.net>
List: netbsd-bugs
Date: 05/29/2006 08:40:00
>Number:         33585
>Category:       port-i386
>Synopsis:       Heavy SATA disk load causes huge interrupt load (piixide)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Mon May 29 08:40:00 +0000 2006
>Originator:     James Laird
>Release:        NetBSD 3.0
>Organization:
	AXDF
>Environment:
System: NetBSD what-are-birds 3.0 NetBSD 3.0 (BIRDS.PROF) #0: Tue May 30 02:29:48 EST 2006 root@what-are-birds:/usr/src/sys/arch/i386/compile/BIRDS.PROF i386
Architecture: i386
Machine: i386
>Description:
	Whenever SATA disk is heavily loaded (e.g. making filesystems) the CPU interrupt time climbs to 60-80% (Intel P4 2.8Ghz).
	vmstat -i shows an interrupt rate on the appropriate ioapic pin in the region of 1-2 thousand per second with disk load, and less than 100 with no load.
	The pin is shared between the native-PCI interrupt for the disk, and an unused UHCI USB controller. Disabling the USB port in the BIOS makes no change.

----	dmesg | grep piix:
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801EB IDE Controller (ICH5) (rev. 0x02)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at ioapic0 pin 14 (irq 14)
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel interrupting at ioapic0 pin 15 (irq 15)
atabus1 at piixide0 channel 1
piixide1 at pci0 dev 31 function 2
piixide1: Intel 82801EB Serial ATA Controller (rev. 0x02)
piixide1: bus-master DMA support present
piixide1: primary channel configured to native-PCI mode
piixide1: using ioapic0 pin 18 (irq 3) for native-PCI interrupt
atabus2 at piixide1 channel 0
piixide1: secondary channel configured to native-PCI mode
atabus3 at piixide1 channel 1
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
wd1(piixide0:0:1): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
cd0(piixide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
wd2(piixide1:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
-----
>How-To-Repeat:
Run a disk-intensive task on wd2, the SATA disk.

>Fix:

Unknown