Attached is the packported patch for 2.6.3-gentoo-r2. Jens Axboe posted a patch on the Linux kernel mailinglist some time ago, and this Reproducible: Sometimes Steps to Reproduce: 1. Start cdparanoia Actual Results: CPU-Usage goes to 100%, even in slow ripping modes and on high end hardware Expected Results: If CD-Ripping was using DMA, the CPU-Usage would stay low. Hardware: 0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333] Subsystem: Unknown device 1849:3099 Flags: bus master, 66Mhz, medium devsel, latency 0 Memory at e0000000 (32-bit, prefetchable) Capabilities: [a0] AGP version 2.0 Capabilities: [c0] Power Management version 2 0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP] (prog-if 00 [Normal decode]) Flags: bus master, 66Mhz, medium devsel, latency 0 Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 Memory behind bridge: dde00000-dfefffff Prefetchable memory behind bridge: cdd00000-ddcfffff Capabilities: [80] Power Management version 2 0000:00:0b.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11) Subsystem: Hauppauge computer works Inc. WinTV Series Flags: bus master, medium devsel, latency 32, IRQ 19 Memory at dddfe000 (32-bit, prefetchable) Capabilities: [44] Vital Product Data Capabilities: [4c] Power Management version 2 0000:00:0b.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11) Subsystem: Hauppauge computer works Inc. WinTV Series Flags: bus master, medium devsel, latency 32, IRQ 19 Memory at dddff000 (32-bit, prefetchable) Capabilities: [44] Vital Product Data Capabilities: [4c] Power Management version 2 0000:00:0c.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 04) Subsystem: Ensoniq: Unknown device 8001 Flags: bus master, slow devsel, latency 32, IRQ 16 I/O ports at d800 Capabilities: [dc] Power Management version 2 0000:00:0d.0 Unknown mass storage controller: Promise Technology, Inc. 20268 (rev 02) (prog-if 85) Subsystem: Promise Technology, Inc. Ultra100TX2 Flags: bus master, 66Mhz, slow devsel, latency 32, IRQ 17 I/O ports at ec00 [size=dffe0000] I/O ports at e800 [size=4] I/O ports at e400 [size=8] I/O ports at e000 [size=4] I/O ports at dc00 [size=16] Memory at dfffc000 (32-bit, non-prefetchable) [size=16K] Expansion ROM at 00004000 [disabled] Capabilities: [60] Power Management version 1 0000:00:10.0 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) (prog-if 00 [UHCI]) Subsystem: VIA Technologies, Inc. VT6202 [USB 2.0 controller] Flags: bus master, medium devsel, latency 32, IRQ 21 I/O ports at cc00 [size=32] Capabilities: [80] Power Management version 2 0000:00:10.1 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) (prog-if 00 [UHCI]) Subsystem: VIA Technologies, Inc. VT6202 [USB 2.0 controller] Flags: bus master, medium devsel, latency 32, IRQ 21 I/O ports at d000 [size=32] Capabilities: [80] Power Management version 2 0000:00:10.2 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) (prog-if 00 [UHCI]) Subsystem: VIA Technologies, Inc. VT6202 [USB 2.0 controller] Flags: bus master, medium devsel, latency 32, IRQ 21 I/O ports at d400 [size=32] Capabilities: [80] Power Management version 2 0000:00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) (prog-if 20 [EHCI]) Subsystem: VIA Technologies, Inc. USB 2.0 Flags: bus master, medium devsel, latency 32, IRQ 21 Memory at dfffbf00 (32-bit, non-prefetchable) Capabilities: [80] Power Management version 2 0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge Subsystem: Unknown device 1849:3177 Flags: bus master, stepping, medium devsel, latency 0 Capabilities: [c0] Power Management version 2 0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C/VT8235 PIPC Bus Master IDE (rev 06) (prog-if 8a [Master SecP PriP]) Subsystem: Unknown device 1849:0571 Flags: bus master, medium devsel, latency 32, IRQ 255 I/O ports at fc00 [size=16] Capabilities: [c0] Power Management version 2 0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50) Subsystem: VIA Technologies, Inc.: Unknown device 4161 Flags: medium devsel, IRQ 22 I/O ports at c800 Capabilities: [c0] Power Management version 2 0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74) Subsystem: VIA Technologies, Inc. VT6102 [Rhine-II] Flags: bus master, medium devsel, latency 32, IRQ 23 I/O ports at c400 Memory at dfffbe00 (32-bit, non-prefetchable) [size=256] Capabilities: [40] Power Management version 2 0000:01:00.0 VGA compatible controller: nVidia Corporation NV28 [GeForce4 Ti 4200 AGP 8x] (rev a1) (prog-if 00 [VGA]) Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 16 Memory at de000000 (32-bit, non-prefetchable) [size=dfee0000] Memory at d0000000 (32-bit, prefetchable) [size=128M] Expansion ROM at 00020000 [disabled] Capabilities: [60] Power Management version 2 Capabilities: [44] AGP version 3.0 Drive: /dev/hda: ATAPI CD-ROM, with removable media Model Number: PLEXTOR CD-R PX-W4824A Serial Number: 540370 Firmware Revision: 1.04 Standards: Likely used CD-ROM ATAPI-1 Configuration: DRQ response: 50us. Packet size: 12 bytes Capabilities: LBA, IORDY(can be disabled) DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 *udma2 Cycle time: min=120ns recommended=120ns PIO: pio0 pio1 pio2 pio3 pio4 Cycle time: no flow control=180ns IORDY flow control=120ns
Created attachment 27104 [details, diff] Attached file is Jens Axboe's Diff for 2.6.4-rc1 backported to 2.6.3-gentoo-r2. Compiles and runs fine on my machine. The author describes the patch as still being "unstable".
Actual URL of the patch: http://lwn.net/Articles/74132/
Some timings on Audio extraction with/without the patch: Read speed without patch: ca. 2.4x (cdparanoia) CPU Utilization: 100% (1% user, 3% system, 96% IO-wait) Read speed with patch: ca. 48x (cdparanoia) CPU Utilization: 18% (17% user, 1% system, 0% IO-wait)
Evaluated this patch myself. Applied cleanly, compiled without problems. The speed doubled, but I'm not experiencing the huge increase you had: source: "Nirvana - Incesticide" (44:42.35) ------------------------------------------ PLEXTOR CD-R PX-W1210A, ATAPI CD/DVD-ROM drive cmdline: time cdparanoia -v -B 2.6.3-gentoo-r2, patch not applied: ~6x --------------------------------------- real 7m23.133s user 1m2.056s sys 0m14.159s 2.6.3-gentoo-r2-hw1, patched: ~11,8x ------------------------------------ real 3m47.999s user 1m0.836s sys 0m10.090s > diff -q -s nopatch/md5sum.nopatch patch/md5sum.patched Files nopatch/md5sum.nopatch and patch/md5sum.patched are identical My CDROM/RW drive: /dev/hda: ATAPI CD-ROM, with removable media Model Number: PLEXTOR CD-R PX-W1210A Serial Number: Firmware Revision: 1.10 Standards: Likely used CD-ROM ATAPI-1 Configuration: DRQ response: 50us. Packet size: 12 bytes Capabilities: LBA, IORDY(can be disabled) DMA: sdma0 sdma1 sdma2 mdma0 mdma1 *mdma2 Cycle time: min=120ns recommended=120ns PIO: pio0 pio1 pio2 pio3 pio4 Cycle time: no flow control=180ns IORDY flow control=120ns Anyway, doubling speed isn't bad at all. This patch seems to be good.
Created attachment 27475 [details, diff] Same patch for 2.6.4-gentoo, patches the kernel to 2.6.4-gentoo-hw1 This patch is for 2.6.4-gentoo, and has the same functionality as the patch for 2.6.3-gentoo-r2.
Heiko, thank you for the updated patch. After changing the paths, it applied cleanly to 2.6.4-gentoo-r1. Still very good results: Source Device: PLEXTOR CD-R PX-W1210A Source CD: Nirvana, "In Utero", (69:03) CMD Line: time cdparanoia -v -B -Y -Z Kernel: Linux 2.6.4-gentoo-r1 (unpatched) Speed: 4m56.765s (~14x), ~60% CPU load (measured by gkrellm) Kernel: Linux 2.6.4-gentoo-r1-hw1 (patched) Speed 3m1.128s (~23x), ~10% CPU load (measured by gkrellm) This patch applies cleanly, compiles cleanly and did not cause any problems so far with the two different kernel versions I evaluated here.
Possible conflict with ATAPI CD burning? While I tried to burn an audio cd with 2.6.4-gentoo-r1-hw1 (using k3b, which utilizes cdrecord), I got a time out error from cdrecord and the burn process died before writing the first track. That said: I don't use IDE-SCSI emulation, but ATAPI to burn my CDs. I recompiled 2.6.4-gentoo-r1 without this patch, and burning the CD succeeded. Maybe some of you could confirm or falsify my observation, as this would be definetly a bug which shouldn't be there.
This patch has made it mainstream already.