Debian Bug report logs - #520928
linux-image-2.6.26-1-686: PIIX4 /dev/hda performance regression (10x times, DMA dissabled)

Package: linux-2.6; Maintainer for linux-2.6 is Debian Kernel Team <debian-kernel@lists.debian.org>;

Reported by: root <baryluk@smp.if.uj.edu.pl>

Date: Mon, 23 Mar 2009 17:39:01 UTC

Severity: important

Done: Ben Hutchings <ben@decadent.org.uk>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#520928; Package linux-image-2.6.26-1-686. (Mon, 23 Mar 2009 17:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to root <baryluk@smp.if.uj.edu.pl>:
New Bug report received and forwarded. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Mon, 23 Mar 2009 17:39:03 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: root <baryluk@smp.if.uj.edu.pl>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: linux-image-2.6.26-1-686: PIIX4 /dev/hda performance regression (10x times, DMA dissabled)
Date: Mon, 23 Mar 2009 18:36:10 +0100
Package: linux-image-2.6.26-1-686
Version: 2.6.26-13lenny2
Severity: important


I have 450NX server board (two cpu Xeon II 450MHz). My ide controler is PIIX4.

I found that after update to lenny's 2.6.26-1-xen-686 IDE performance droped
to just 1.50MB/s (hdparm -t). With 2.6.18-6-xen-686 I had 21.54 MB/s.
(Tested both in -xen-686 and -686, in signle user). Performance
of scsi disc's doesn't changed.

I found this messages in dmesg (2.6.26-1-xen-686):
[    3.662184] SCSI subsystem initialized
[    3.734253] Uniform Multi-Platform E-IDE driver
[    3.734253] ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
[    3.829917] usbcore: registered new interface driver usbfs
[    3.830286] usbcore: registered new interface driver hub
[    3.845788] usbcore: registered new device driver usb
[    3.886790] ACPI: PCI Interrupt 0000:01:03.0[A] -> GSI 57 (level, low) -> IRQ 57
[    3.888465] sym0: <896> rev 0x1 at pci 0000:01:03.0 irq 57
[    3.904795] sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
[    3.912491] sym0: SCSI BUS has been reset.
[    3.912721] scsi0 : sym-2.2.3
[    3.916707] ACPI: PCI Interrupt 0000:01:03.1[B] -> GSI 56 (level, low) -> IRQ 56
[    3.916873] sym1: <896> rev 0x1 at pci 0000:01:03.1 irq 56
[    3.919506] sym1: No NVRAM, ID 7, Fast-40, LVD, parity checking
[    3.923506] sym1: SCSI BUS has been reset.
[    3.925391] scsi1 : sym-2.2.3
[    3.926118] ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 58 (level, low) -> IRQ 58
[    3.927288] sym2: <810a> rev 0x23 at pci 0000:00:08.0 irq 58
[    3.928041] USB Universal Host Controller Interface driver v3.0
[    3.931996] sym2: No NVRAM, ID 7, Fast-10, SE, parity checking
[    3.938010] sym2: SCSI BUS has been reset.
[    3.938028] scsi2 : sym-2.2.3
[    3.939923] ACPI: PCI Interrupt 0000:00:0c.2[D] -> GSI 54 (level, low) -> IRQ 54
[    3.939923] uhci_hcd 0000:00:0c.2: UHCI Host Controller
[    3.940073] uhci_hcd 0000:00:0c.2: new USB bus registered, assigned bus number 1
[    3.940426] uhci_hcd 0000:00:0c.2: irq 54, io base 0x00002c00
[    3.941228] usb usb1: configuration #1 chosen from 1 choice
[    3.941577] hub 1-0:1.0: USB hub found
[    3.941833] hub 1-0:1.0: 2 ports detected
[    4.041535] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
[    4.041760] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.041962] usb usb1: Product: UHCI Host Controller
[    4.042144] usb usb1: Manufacturer: Linux 2.6.26-1-xen-686 uhci_hcd
[    4.042329] usb usb1: SerialNumber: 0000:00:0c.2
[    4.054227] piix: 450NX errata present, disabling IDE DMA.
[    4.054433] piix: A BIOS update may resolve this.
[    4.056035] PIIX4: IDE controller (0x8086:0x7111 rev 0x01) at  PCI slot 0000:00:0c.1
[    4.056051] PIIX4: not 100% native mode: will probe irqs later
[    4.056051] PIIX4: IDE port disabled
[    4.056051]     ide0: BM-DMA at 0x2c20-0x2c27
[    4.056757] Probing IDE interface ide0...
[    4.349476] hda: IBM-DTLA-307030, ATA DISK drive
[    5.021402] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[    5.021674] hda: no DMA mode selected
[    5.021888] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[    5.022174] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[    5.022815] PIIX4: IDE controller (0x8086:0x84ca rev 0x03) at  PCI slot 0000:00:10.0
[    5.023074] PIIX4: device not capable of full native PCI mode
[    5.023259] PIIX4: device disabled (BIOS)
[    5.044348] No dock devices found.
[    5.284367] libata version 3.00 loaded.
[    5.384457] Floppy drive(s): fd0 is 1.44M
[    5.384457] floppy0: Unable to grab DMA2 for the floppy driver
[    5.428944] udev: renamed network interface eth1 to eth2
[    5.865766] hda: max request size: 128KiB
[    5.887987] hda: 60036480 sectors (30738 MB) w/1916KiB Cache, CHS=59560/16/63
[    5.888481] hda: cache flushes not supported
[    5.888869]  hda: hda1 hda3
[    8.413933] floppy0: no floppy controllers found
[    8.731608] scsi 2:0:6:0: Direct-Access     IBM      DDRS-39130       S97B PQ: 0 ANSI: 2
[    8.731856]  target2:0:6: tagged command queuing enabled, command queue depth 16.
[    8.732094]  target2:0:6: Beginning Domain Validation
[    8.732747]  target2:0:6: asynchronous
[    8.735657] kjournald starting.  Commit interval 5 seconds
[    8.739266] EXT3-fs: mounted filesystem with ordered data mode.
[    8.751259]  target2:0:6: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[    8.763646]  target2:0:6: Domain Validation skipping write tests
[    8.763863]  target2:0:6: Ending Domain Validation
[    8.911419] scsi 0:0:6:0: Processor         ESG-SHV  SCA HSBP M6      0.61 PQ: 0 ANSI: 2
[    8.911709]  target0:0:6: Beginning Domain Validation
[    9.140531]  target0:0:6: asynchronous
[    9.143055] sym0: unexpected disconnect
[    9.143352]  target0:0:6: Domain Validation Initial Inquiry Failed
[    9.143366]  target0:0:6: Ending Domain Validation
[   13.284272] udevd version 125 started
[   14.530680] scsi 0:0:6:0: Attached scsi generic sg0 type 3
[   14.530837] scsi 2:0:6:0: Attached scsi generic sg1 type 0
[   14.706049] Driver 'sd' needs updating - please use bus_type methods
[   14.754751] sd 2:0:6:0: [sda] 17850000 512-byte hardware sectors (9139 MB)
[   14.806751] sd 2:0:6:0: [sda] Write Protect is off
[   14.806987] sd 2:0:6:0: [sda] Mode Sense: b9 00 00 08
[   14.839284] sd 2:0:6:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   14.887947] sd 2:0:6:0: [sda] 17850000 512-byte hardware sectors (9139 MB)
[   14.943212] sd 2:0:6:0: [sda] Write Protect is off
[   14.943464] sd 2:0:6:0: [sda] Mode Sense: b9 00 00 08
[   14.976129] sd 2:0:6:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   14.976413]  sda: sda1 sda2 sda3
[   15.007224] sd 2:0:6:0: [sda] Attached SCSI disk
[   17.260491] piix4_smbus 0000:00:0c.3: Found 0000:00:0c.3 device


root@noisy:~# lsmod | grep piix
i2c_piix4               7984  0 
i2c_core               20564  1 i2c_piix4
piix                    7336  0 [permanent]
ide_core               98248  4 ide_cd_mod,ide_disk,piix,ide_pci_generic


So it looks like there is some blacklist (in piix modules) for this server board,
and kernel uses generic (and non-dma) module for ide. But with 2.6.18-686 it was working.
Additionally I probably have newset BIOS possible.

Mayby this is because of broken write cache flushing?



-- Package-specific info:

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-xen-686 (SMP w/1 CPU core)
Locale: LANG=, LC_CTYPE= (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages linux-image-2.6.26-1-686 depends on:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
ii  initramfs-tools [linux-initra 0.92o      tools for generating an initramfs
ii  module-init-tools             3.4-1      tools for managing Linux kernel mo

Versions of packages linux-image-2.6.26-1-686 recommends:
pn  libc6-i686                    <none>     (no description available)

Versions of packages linux-image-2.6.26-1-686 suggests:
ii  grub                       0.97-47lenny2 GRand Unified Bootloader (Legacy v
pn  linux-doc-2.6.26           <none>        (no description available)

-- debconf information:
  linux-image-2.6.26-1-686/preinst/abort-overwrite-2.6.26-1-686:
  shared/kernel-image/really-run-bootloader: true
  linux-image-2.6.26-1-686/preinst/bootloader-initrd-2.6.26-1-686: true
  linux-image-2.6.26-1-686/prerm/would-invalidate-boot-loader-2.6.26-1-686: true
  linux-image-2.6.26-1-686/postinst/bootloader-error-2.6.26-1-686:
  linux-image-2.6.26-1-686/preinst/elilo-initrd-2.6.26-1-686: true
  linux-image-2.6.26-1-686/postinst/old-dir-initrd-link-2.6.26-1-686: true
  linux-image-2.6.26-1-686/postinst/kimage-is-a-directory:
  linux-image-2.6.26-1-686/postinst/depmod-error-initrd-2.6.26-1-686: false
  linux-image-2.6.26-1-686/prerm/removing-running-kernel-2.6.26-1-686: true
  linux-image-2.6.26-1-686/postinst/create-kimage-link-2.6.26-1-686: true
  linux-image-2.6.26-1-686/preinst/lilo-initrd-2.6.26-1-686: true
  linux-image-2.6.26-1-686/postinst/old-initrd-link-2.6.26-1-686: true
  linux-image-2.6.26-1-686/preinst/overwriting-modules-2.6.26-1-686: true
  linux-image-2.6.26-1-686/postinst/depmod-error-2.6.26-1-686: false
  linux-image-2.6.26-1-686/postinst/bootloader-test-error-2.6.26-1-686:
  linux-image-2.6.26-1-686/preinst/failed-to-move-modules-2.6.26-1-686:
  linux-image-2.6.26-1-686/postinst/old-system-map-link-2.6.26-1-686: true
  linux-image-2.6.26-1-686/preinst/initrd-2.6.26-1-686:
  linux-image-2.6.26-1-686/preinst/abort-install-2.6.26-1-686:
  linux-image-2.6.26-1-686/preinst/lilo-has-ramdisk:




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#520928; Package linux-image-2.6.26-1-686. (Sun, 10 May 2009 15:03:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Witold Baryluk" <baryluk@smp.if.uj.edu.pl>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Sun, 10 May 2009 15:03:06 GMT) Full text and rfc822 format available.

Message #10 received at 520928@bugs.debian.org (full text, mbox):

From: "Witold Baryluk" <baryluk@smp.if.uj.edu.pl>
To: 520928@bugs.debian.org
Subject: Additional info
Date: Sun, 10 May 2009 16:58:24 +0200
[Message part 1 (text/plain, inline)]
This is Intel SC450NX MP Server System.

I just updated bios to RELEASE 16.0 - Build 89     (3/1/01)
which is newset possible for this system (acording to intel support).

root@noisy:~# lspci 
00:06.0 Ethernet controller: D-Link System Inc DGE-528T Gigabit Ethernet Adapter (rev 10)
00:07.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 43)
00:08.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 23)
00:0a.0 VGA compatible controller: Cirrus Logic GD 5480 (rev 23)
00:0b.0 PIC: Intel Corporation 683053 Programmable Interrupt Device
00:0c.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 02)
00:0c.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:0c.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01)
00:0c.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:10.0 Host bridge: Intel Corporation 450NX - 82451NX Memory & I/O Controller (rev 03)
00:12.0 Host bridge: Intel Corporation 450NX - 82454NX/84460GX PCI Expander Bridge (rev 02)
00:13.0 Host bridge: Intel Corporation 450NX - 82454NX/84460GX PCI Expander Bridge (rev 02)
01:03.0 SCSI storage controller: LSI Logic / Symbios Logic 53C896/897 (rev 01)
01:03.1 SCSI storage controller: LSI Logic / Symbios Logic 53C896/897 (rev 01)

root@noisy:~# lspci -n 
00:06.0 0200: 1186:4300 (rev 10)
00:07.0 0200: 1106:3065 (rev 43)
00:08.0 0100: 1000:0001 (rev 23)
00:0a.0 0300: 1013:00bc (rev 23)
00:0b.0 0800: 8086:123d
00:0c.0 0601: 8086:7110 (rev 02)
00:0c.1 0101: 8086:7111 (rev 01)
00:0c.2 0c03: 8086:7112 (rev 01)
00:0c.3 0680: 8086:7113 (rev 02)
00:10.0 0600: 8086:84ca (rev 03)
00:12.0 0600: 8086:84cb (rev 02)
00:13.0 0600: 8086:84cb (rev 02)
01:03.0 0100: 1000:000b (rev 01)
01:03.1 0100: 1000:000b (rev 01)

# interesting parts

00:0c.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 80 [Master])
	Flags: bus master, medium devsel, latency 64
	[virtual] Memory at 000001f0 (32-bit, non-prefetchable) [disabled] [size=8]
	[virtual] Memory at 000003f0 (type 3, non-prefetchable) [disabled] [size=1]
	[virtual] Memory at 00000170 (32-bit, non-prefetchable) [disabled] [size=8]
	[virtual] Memory at 00000370 (type 3, non-prefetchable) [disabled] [size=1]
	I/O ports at 2c20 [size=16]
	Kernel driver in use: PIIX_IDE
	Kernel modules: piix

00:0c.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01) (prog-if 00 [UHCI])
	Flags: bus master, medium devsel, latency 64, IRQ 54
	I/O ports at 2c00 [size=32]
	Kernel driver in use: uhci_hcd
	Kernel modules: uhci-hcd

00:0c.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
	Flags: medium devsel, IRQ 9
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c-piix4

00:10.0 Host bridge: Intel Corporation 450NX - 82451NX Memory & I/O Controller (rev 03)
	Flags: fast devsel
	Kernel modules: piix


root@noisy:~# hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:    84 MB in  2.00 seconds =  41.91 MB/sec
 Timing buffered disk reads:    6 MB in  3.99 seconds =   1.50 MB/sec
root@noisy:~# 




As far as I know rev 03 is blacklisted for some reason. Is there a way to force
dma?




-- 
Witold Baryluk
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#520928; Package linux-image-2.6.26-1-686. (Mon, 19 Oct 2009 02:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Mon, 19 Oct 2009 02:21:03 GMT) Full text and rfc822 format available.

Message #15 received at 520928@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Cc: 520928@bugs.debian.org
Subject: Re: linux-image-2.6.26-1-686: PIIX4 /dev/hda performance regression (10x times, DMA dissabled)
Date: Mon, 19 Oct 2009 03:07:44 +0100
[Message part 1 (text/plain, inline)]
On Mon, 2009-03-23 at 18:36 +0100, root wrote:
> Package: linux-image-2.6.26-1-686
> Version: 2.6.26-13lenny2
> Severity: important
> 
> 
> I have 450NX server board (two cpu Xeon II 450MHz). My ide controler is PIIX4.
> 
> I found that after update to lenny's 2.6.26-1-xen-686 IDE performance droped
> to just 1.50MB/s (hdparm -t). With 2.6.18-6-xen-686 I had 21.54 MB/s.
> (Tested both in -xen-686 and -686, in signle user). Performance
> of scsi disc's doesn't changed.
[...]
> [    4.054227] piix: 450NX errata present, disabling IDE DMA.
> [    4.054433] piix: A BIOS update may resolve this.
> [    4.056035] PIIX4: IDE controller (0x8086:0x7111 rev 0x01) at  PCI slot 0000:00:0c.1
> [    4.056051] PIIX4: not 100% native mode: will probe irqs later
> [    4.056051] PIIX4: IDE port disabled
> [    4.056051]     ide0: BM-DMA at 0x2c20-0x2c27
> [    4.056757] Probing IDE interface ide0...
> [    4.349476] hda: IBM-DTLA-307030, ATA DISK drive
> [    5.021402] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
> [    5.021674] hda: no DMA mode selected
> [    5.021888] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[...]
> So it looks like there is some blacklist (in piix modules) for this server board,
> and kernel uses generic (and non-dma) module for ide. But with 2.6.18-686 it was working.

However, this blacklist has been present since before Linux 2.6.12, so
it doesn't really explain the change.

> Additionally I probably have newset BIOS possible.
> 
> Mayby this is because of broken write cache flushing?
[...]

What do you mean?

> As far as I know rev 03 is blacklisted for some reason. Is there a way to force
> dma?

I expect that you can do this using hdparm, but I wouldn't recommend it.

Ben.

-- 
Ben Hutchings
It is impossible to make anything foolproof because fools are so ingenious.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#520928; Package linux-image-2.6.26-1-686. (Tue, 20 Oct 2009 15:00:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Witold Baryluk" <baryluk@smp.if.uj.edu.pl>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Tue, 20 Oct 2009 15:00:06 GMT) Full text and rfc822 format available.

Message #20 received at 520928@bugs.debian.org (full text, mbox):

From: "Witold Baryluk" <baryluk@smp.if.uj.edu.pl>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: 520928@bugs.debian.org
Subject: Re: linux-image-2.6.26-1-686: PIIX4 /dev/hda performance regression (10x times, DMA dissabled)
Date: Tue, 20 Oct 2009 16:52:55 +0200
[Message part 1 (text/plain, inline)]
On 10-19 03:07, Ben Hutchings wrote:
> On Mon, 2009-03-23 at 18:36 +0100, root wrote:
> > Package: linux-image-2.6.26-1-686
> > Version: 2.6.26-13lenny2
> > Severity: important
>
> > So it looks like there is some blacklist (in piix modules) for this server board,
> > and kernel uses generic (and non-dma) module for ide. But with 2.6.18-686 it was working.
> 
> However, this blacklist has been present since before Linux 2.6.12, so
> it doesn't really explain the change.
Hmm, i checked in git, and you are right, it is for long time (with small modification).
But as I already stated in Etch's 2.6.18-686 dmesg doesn't containt,
messages which are in 2.6.26. But according to sources they should be
excetly the same. So for some reason (API interfaces, PCI read procedures)
it is not blacklisted on older kernel.

> 
> > Additionally I probably have newset BIOS possible.
> > 
> > Mayby this is because of broken write cache flushing?
> [...]
> 
> What do you mean?

I just can't find erratum for this chipset so I don't know what was reason
for blacklisting this pci device id + rev. I was hypothetising
this is due to the broken "cache flush" support. So it (but in hw) can
potentilly make data losses. So for safety it is using slower mode.

But now i know it is something to do with UDMA directly.



> > As far as I know rev 03 is blacklisted for some reason. Is there a way to force
> > dma?
> 
> I expect that you can do this using hdparm, but I wouldn't recommend it.

And i don't want to experimate in this way.

What i want to say that when i was using 2.6.18 i have no problem with
performance, and no data losses, or any strange message, any DMA errors,
any incorect CRC checksums, etc.

Mayby it was problem in older BIOSes. I had no problem, even in older version
of BIOS. No i have the newest BIOS, and still it should be no problem.
(and in fact booting on 2.6.18 and testing it shows it is working correclty
in UDMA).
I checked few times data, and there was no silent data coruption.

Can it be "false positive"? I can't find erratum document, so i can't
verify if this is problem with my hardware or with implementation
of erratum in linux kernel. Eventually erratum can state in what
condition it is not safe to use UDMA, and i can check if
this conditions are met or not.



-- 
Witold Baryluk
JID: witold.baryluk // jabster.pl
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#520928; Package linux-image-2.6.26-1-686. (Wed, 21 Oct 2009 01:42:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Wed, 21 Oct 2009 01:42:03 GMT) Full text and rfc822 format available.

Message #25 received at 520928@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Cc: 520928@bugs.debian.org
Subject: Re: linux-image-2.6.26-1-686: PIIX4 /dev/hda performance regression (10x times, DMA dissabled)
Date: Wed, 21 Oct 2009 02:19:04 +0100
[Message part 1 (text/plain, inline)]
On Tue, 2009-10-20 at 16:52 +0200, Witold Baryluk wrote:
> On 10-19 03:07, Ben Hutchings wrote:
> > On Mon, 2009-03-23 at 18:36 +0100, root wrote:
> > > Package: linux-image-2.6.26-1-686
> > > Version: 2.6.26-13lenny2
> > > Severity: important
> >
> > > So it looks like there is some blacklist (in piix modules) for this server board,
> > > and kernel uses generic (and non-dma) module for ide. But with 2.6.18-686 it was working.
> > 
> > However, this blacklist has been present since before Linux 2.6.12, so
> > it doesn't really explain the change.
> Hmm, i checked in git, and you are right, it is for long time (with small modification).
> But as I already stated in Etch's 2.6.18-686 dmesg doesn't containt,
> messages which are in 2.6.26. But according to sources they should be
> excetly the same. So for some reason (API interfaces, PCI read procedures)
> it is not blacklisted on older kernel.

I looked more closely at the changelog and found that although the
blacklist has been present for a long time, there was also a bug that
meant that it did not have the intended effect of disabling DMA.

This was fixed by this change in Linux 2.6.20:

commit 44854add66811124a5667466245b6824f751143a
Author: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Date:   Fri Dec 29 16:49:26 2006 -0800

    [PATCH] PIIX/SLC90E66: PIO mode fallback fix

[...]
> Can it be "false positive"?
[...]

Since you say that IDE DMA was reliable under 2.6.18, it seems that you
have found a false positive.  But until we know exactly which
configurations of the 450NX do have reliable IDE DMA, we cannot
reasonably change this blacklist.

If you want to get this fixed in the kernel rather than by overriding it
with hdparm, please test Linux 2.6.31 from the Debian experimental
repository.  If that still has the problem, you can report it upstream
at <http://bugzilla.kernel.org> and hopefully get an IDE maintainer to
investigate it.

Ben.

-- 
Ben Hutchings
Everything should be made as simple as possible, but not simpler.
                                                           - Albert Einstein
[signature.asc (application/pgp-signature, inline)]

Bug reassigned from package 'linux-image-2.6.26-1-686' to 'linux-2.6'. Request was from Martin Michlmayr <tbm@cyrius.com> to control@bugs.debian.org. (Thu, 11 Feb 2010 23:44:04 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions 2.6.26-13lenny2. Request was from Martin Michlmayr <tbm@cyrius.com> to control@bugs.debian.org. (Thu, 11 Feb 2010 23:44:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#520928; Package linux-2.6. (Mon, 10 Jan 2011 06:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Witold Baryluk" <baryluk@smp.if.uj.edu.pl>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Mon, 10 Jan 2011 06:42:02 GMT) Full text and rfc822 format available.

Message #34 received at 520928@bugs.debian.org (full text, mbox):

From: "Witold Baryluk" <baryluk@smp.if.uj.edu.pl>
To: 520928@bugs.debian.org
Subject: PIIX performance regression still present in lenny's 2.6.26*
Date: Mon, 10 Jan 2011 07:33:38 +0100
[Message part 1 (text/plain, inline)]
Why this bug was marked
"No longer marked as found in versions 2.6.26-13lenny2. "
?

I have newest lenny kernel and problem is stil present.
(It is annoying, but becuase I have most of data on scsi disks,
IDE performance isn't very important currently beyond booting system)

root@noisy:~# hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:     2 MB in  3.25 seconds = 630.59 kB/sec
 Timing buffered disk reads:    2 MB in  3.43 seconds = 597.07 kB/sec

root@noisy:~# hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:    24 MB in  2.02 seconds =  11.89 MB/sec
 Timing buffered disk reads:    4 MB in  3.56 seconds =   1.12 MB/sec

root@noisy:~# hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:    16 MB in  2.06 seconds =   7.78 MB/sec
 Timing buffered disk reads:    4 MB in  3.14 seconds =   1.27 MB/sec
root@noisy:~# hdparm --direct -tT /dev/hda

/dev/hda:
 Timing O_DIRECT cached reads:     4 MB in  2.87 seconds =   1.39 MB/sec
 Timing O_DIRECT disk reads:    6 MB in  4.36 seconds =   1.38 MB/sec
root@noisy:~# hdparm --direct -tT /dev/hda

/dev/hda:
 Timing O_DIRECT cached reads:     4 MB in  2.74 seconds =   1.46 MB/sec
 Timing O_DIRECT disk reads:    6 MB in  4.37 seconds =   1.37 MB/sec

#


As one can see it is even worse than it was (my previous reports given about 1.5 MB/s buffered disk read).


root@noisy:~# hdparm -d /dev/hda

/dev/hda:
 using_dma     =  0 (off)

root@noisy:~# hdparm -d1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Input/output error
 using_dma     =  0 (off)

# dmesg | tail
[6545265.490382] hda: no DMA mode selected
[6545265.490485] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
#


root@noisy:~# dpkg -l | grep linux-image
ii  linux-image-2.6-686                     2.6.26+17+lenny1         Linux 2.6 image on PPro/Celeron/PII/PIII/P4
ii  linux-image-2.6-686-smp                 2.6.18+6etch3            Linux 2.6 image on PPro/Celeron/PII/PIII/P4 
ii  linux-image-2.6-xen-686                 2.6.26+17+lenny1         Linux 2.6 image on i686, oldstyle Xen suppor
ii  linux-image-2.6.18-6-686                2.6.18.dfsg.1-23etch1    Linux 2.6.18 image on PPro/Celeron/PII/PIII/
ii  linux-image-2.6.18-6-xen-686            2.6.18.dfsg.1-23etch1    Linux 2.6.18 image on i686
ii  linux-image-2.6.18-6-xen-vserver-686    2.6.18.dfsg.1-23etch1    Linux 2.6.18 image on i686
ii  linux-image-2.6.26-1-686                2.6.26-13lenny2          Linux 2.6.26 image on PPro/Celeron/PII/PIII/
ii  linux-image-2.6.26-1-xen-686            2.6.26-13lenny2          Linux 2.6.26 image on i686, oldstyle Xen sup
ii  linux-image-2.6.26-2-686                2.6.26-26lenny1          Linux 2.6.26 image on PPro/Celeron/PII/PIII/
ii  linux-image-2.6.26-2-xen-686            2.6.26-26lenny1          Linux 2.6.26 image on i686, oldstyle Xen sup
root@noisy:~# uname -a
Linux noisy 2.6.26-2-xen-686 #1 SMP Mon Aug 30 10:02:38 UTC 2010 i686 GNU/Linux



root@noisy:~# hdparm -iI /dev/hda

/dev/hda:

 Model=IBM-DTLA-307030, FwRev=XXXXXXXXX, SerialNo=XXXXXXXXX
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=40
 BuffType=DualPortCache, BuffSize=1916kB, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=60036480
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 
 AdvancedPM=yes: disabled (255) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 1:  ATA/ATAPI-2,3,4,5

 * signifies the current active mode


ATA device, with non-removable media
powers-up in standby; SET FEATURES subcmd spins-up.
	Model Number:       IBM-DTLA-307030                         
	Serial Number:      XXXXXXXXXXX
	Firmware Revision:  TXXXXXXXXX
Standards:
	Used: ATA/ATAPI-5 T13 1321D revision 1 
	Supported: 5 4 3 & some of 6
Configuration:
	Logical max current
	cylinders1 6383 16383
	heads 16 16
	sectors/track 63 63
	--
	CHS current addressable sectors:   16514064
	LBA    user addressable sectors:   60036480
	device size with M = 1024*1024:       29314 MBytes
	device size with M = 1000*1000:       30738 MBytes (30 GB)
Capabilities:
	LBA, IORDY(can be disabled)
	bytes avail on r/w long: 40	Queue depth: 32
	Standby timer values: spec'd by Standard, no device specific minimum
	R/W multiple sector transfer: Max = 16	Current = 0
	Advanced power management level: disabled
	Recommended acoustic management value: 128, current value: 254
	DMA: mdma0 mdma1 *mdma2 udma0 udma1 udma2 udma3 udma4 udma5 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=240ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
	   *	SMART feature set
	    	Security Mode feature set
	   *	Power Management feature set
	   *	Write cache
	   *	Look-ahead
	    	Release interrupt
	   *	Host Protected Area feature set
	   *	WRITE_BUFFER command
	   *	READ_BUFFER command
	   *	NOP cmd
	   *	READ/WRITE_DMA_QUEUED
	    	Advanced Power Management feature set
	    	Power-Up In Standby feature set
	    	SET_FEATURES required to spinup after power up
	    	Address Offset Reserved Area Boot
	    	SET_MAX security extension
	    	Automatic Acoustic Management feature set
Security: 
	Master password revision code = 65534
		supported
	not	enabled
	not	locked
	not	frozen
	not	expired: security count
	not	supported: enhanced erase
	26min for SECURITY ERASE UNIT. 
HW reset results:
	CBLID- above Vih
	Device num = 0 determined by the jumper
Checksum: correct
root@noisy:~# 

Relevant part of dmesg

[    0.000000] Linux version 2.6.26-2-xen-686 (Debian 2.6.26-25) (dannf@debian.org) (gcc version 4.1.3 20080704 (
prerelease) (Debian 4.1.2-25)) #1 SMP Mon Aug 30 10:02:38 UTC 2010
...
[    3.670702] SCSI subsystem initialized
...
[    3.779661] Uniform Multi-Platform E-IDE driver
[    3.779882] ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
[    3.826060] piix: 450NX errata present, disabling IDE DMA.
[    3.826060] piix: A BIOS update may resolve this.
[    3.826338] PIIX4: IDE controller (0x8086:0x7111 rev 0x01) at  PCI slot 0000:00:0c.1
[    3.826421] PIIX4: not 100% native mode: will probe irqs later
[    3.826629] PIIX4: IDE port disabled
[    3.826828]     ide0: BM-DMA at 0x2c20-0x2c27
[    3.827081] Probing IDE interface ide0...
...
[    4.119428] hda: IBM-DTLA-307030, ATA DISK drive
[    4.796760] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[    4.797030] hda: no DMA mode selected
[    4.797244] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
...
[    4.811725] PIIX4: IDE controller (0x8086:0x84ca rev 0x03) at  PCI slot 0000:00:10.0
[    4.812005] PIIX4: device not capable of full native PCI mode
[    4.812209] PIIX4: device disabled (BIOS)
...
[    5.202827] libata version 3.00 loaded.
...
[    5.877421] hda: max request size: 128KiB
[    5.905570] hda: 60036480 sectors (30738 MB) w/1916KiB Cache, CHS=59560/16/63
[    5.906121] hda: cache flushes not supported
[    5.906606]  hda: hda1 hda3
...


I can try kernel from squeeze.
I installed 2.6.32-5-686-xen from squeeze (and few dependencies),
but will it work with xen 3.2-1 ?




Regards,
Witek.

-- 
Witold Baryluk
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#520928; Package linux-2.6. (Sun, 23 Jan 2011 00:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Witold Baryluk" <baryluk@smp.if.uj.edu.pl>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Sun, 23 Jan 2011 00:51:03 GMT) Full text and rfc822 format available.

Message #39 received at 520928@bugs.debian.org (full text, mbox):

From: "Witold Baryluk" <baryluk@smp.if.uj.edu.pl>
To: 520928@bugs.debian.org
Subject: linux-image-2.6.26-1-686: PIIX4 /dev/hda performance regression (10x times, DMA dissabled)
Date: Sun, 23 Jan 2011 01:47:59 +0100
[Message part 1 (text/plain, inline)]
Hi.

I tested for a week kernel 2.6.32-5-686-xen on xen 4.0 from squeeze.

Essentially perfromance is still very bad. It is slightly better (about 2-2.5 MB/s,
instead of 1.5 MB/s), but still makes this useless). One still cannot even enforce
using DMA.


-- 
Witold Baryluk
[signature.asc (application/pgp-signature, inline)]

Reply sent to Ben Hutchings <ben@decadent.org.uk>:
You have taken responsibility. (Tue, 31 May 2011 05:03:05 GMT) Full text and rfc822 format available.

Notification sent to root <baryluk@smp.if.uj.edu.pl>:
Bug acknowledged by developer. (Tue, 31 May 2011 05:03:05 GMT) Full text and rfc822 format available.

Message #44 received at 520928-done@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: 520928-done@bugs.debian.org
Subject: Re: linux-image-2.6.26-1-686: PIIX4 /dev/hda performance regression (10x times, DMA dissabled)
Date: Tue, 31 May 2011 06:01:30 +0100
[Message part 1 (text/plain, inline)]
As explained previously, this behaviour is intentional and appears to be
necessary to avoid the risk of data loss.

If you believe that the condition for disabling DMA is incorrect, you
will have to discuss this with the upstream developers
(linux-ide@vger.kernel.org).  We will not change it in Debian unless it
is changed upstream.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 28 Jun 2011 07:33:49 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 19:51:14 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.