You are not logged in.

#1 2008-10-26 18:39:09

mci_nano
Member
From: Germany/Braunschweig
Registered: 2008-10-26
Posts: 14

slow ide cdrom with via board and sata hd

Hello everyone

My problem is about a very slow cdrom transfer speed. Also the system is laggy while transfering data from cdrom. My PC consists of:
* asrock 939dual-sata2 s939 uli m1695
* sata hdd
* ide cdrom

# hwd -e
Testing: kernel (2.6.27-ARCH) supports uevents
10b9:7101 Bridge: ALi Corporation module: - 
          M7101 Power Management Controller [PMU]
10b9:5263 Ethernet controller: ALi Corporation module: uli526x 
          ULi 1689,1573 integrated ethernet.
1102:4001 FireWire (IEEE 1394): Creative Labs module: ohci1394 
          SB Audigy FireWire Port
10b9:1689 Host bridge: ALi Corporation module: agpgart-amd64 
          M1689 K8 Northbridge [Super K8 Single Chip]
10b9:1695 Host bridge: ALi Corporation module: - 
          M1695 K8 Northbridge [PCI Express and HyperTransport]
1022:1101 Host bridge: Advanced Micro Devices [AMD] module: - 
          K8 [Athlon64/Opteron] Address Map
1022:1102 Host bridge: Advanced Micro Devices [AMD] module: - 
          K8 [Athlon64/Opteron] DRAM Controller
1022:1100 Host bridge: Advanced Micro Devices [AMD] module: - 
          K8 [Athlon64/Opteron] HyperTransport Technology Configuration
1022:1103 Host bridge: Advanced Micro Devices [AMD] module: k8temp 
          K8 [Athlon64/Opteron] Miscellaneous Control
10b9:5229 IDE interface: ALi Corporation module: pata_ali 
          M5229 IDE
10b9:5289 IDE interface: ALi Corporation module: sata_uli 
          ULi 5289 SATA
10b9:1563 ISA bridge: ALi Corporation module: ali1563_smbus 
          M1563 HyperTransport South Bridge
1102:7003 Input device controller: Creative Labs module: Emu10k1_gameport 
          SB Audigy Game Port
1102:0004 Multimedia audio controller: Creative Labs module: EMU10K1_Audigy 
          SB Audigy
10b9:5246 PCI bridge: ALi Corporation module: - 
          AGP8X Controller
10b9:5249 PCI bridge: ALi Corporation module: - 
          M5249 HTT to PCI Bridge
10b9:524b PCI bridge: ALi Corporation module: pcieport-driver 
          PCI Express Root Port
10b9:524c PCI bridge: ALi Corporation module: pcieport-driver 
          PCI Express Root Port
10b9:5237 USB Controller: ALi Corporation module: ohci_hcd 
          USB 1.1 Controller
10b9:5237 USB Controller: ALi Corporation module: ohci_hcd 
          USB 1.1 Controller
10b9:5237 USB Controller: ALi Corporation module: ohci_hcd 
          USB 1.1 Controller
10b9:5239 USB Controller: ALi Corporation module: ehci_hcd 
          USB 2.0 Controller
10de:0391 VGA compatible controller: nVidia Corporation module: nv 
          G70 [GeForce 7600 GT]
# uname -r -m -p -i
2.6.27-ARCH x86_64 AMD Athlon(tm) 64 Processor 3700+ AuthenticAMD
# hdparm -tT /dev/dvd

/dev/dvd:
 Timing cached reads:   388 MB in  2.01 seconds = 193.01 MB/sec
 Timing buffered disk reads:    8 MB in  3.45 seconds =   2.32 MB/sec
# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   1134 MB in  2.00 seconds = 566.76 MB/sec
 Timing buffered disk reads:  270 MB in  3.00 seconds =  89.87 MB/sec

As you can see hd speed is normal but cdrom is not.
I searched the internet but have no idea what to do. there is no possibility to tweak dma mode with hdparm but i think it should be activated by itself.

# hdparm -i /dev/dvd

/dev/dvd:

 Model=HL-DT-ST DVDRAM GSA-4163B               , FwRev=A102    , SerialNo=K0C51831630         
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 *udma2 
 AdvancedPM=no
 Drive conforms to: Unspecified:  ATA/ATAPI-2,3,4,5

 * signifies the current active mode

# hdparm -d /dev/dvd

/dev/dvd:
 HDIO_GET_DMA failed: Inappropriate ioctl for device

Any ideas?

Last edited by mci_nano (2008-10-26 20:07:53)

Offline

#2 2008-10-27 19:15:25

mci_nano
Member
From: Germany/Braunschweig
Registered: 2008-10-26
Posts: 14

Re: slow ide cdrom with via board and sata hd

So after reading more and more i discovered there are many people with a problem like this. They are talking about problems when switching to a newer kernel and new libata with it too.
some talk about "not loading ata_generic", ok i tried that, with no result.
afterwards someone came up with a modprobe parameter

modprobe pata_ali atapi_dma=1

. that worked a little bit. the system is finaly response while doing dvd I/O. but its not as fast as it should be...

# hdparm -tT /dev/dvd

/dev/dvd:
 Timing cached reads:   832 MB in  2.00 seconds = 415.70 MB/sec
 Timing buffered disk reads:    8 MB in  3.04 seconds =   2.63 MB/sec

I also tried to set UDMA fix in BIOS but my system doesn't care wink

Offline

#3 2008-10-29 14:18:20

silvik
Member
From: Bucharest/Romania
Registered: 2006-11-08
Posts: 110

Re: slow ide cdrom with via board and sata hd

i have the same motherboard and the same problem.
unfortunately, i tried to set atapi_dma=1 parameter and it works some time, but later it defaults to no dma (eg when writing a blank dvd the first 25% it's ok, at least 32x speed, and the rest 1-2x. after a reboot the same thing happens).

i tried other approaches and i found this: http://ubuntuforums.org/showthread.php?t=435706, that motherboard is different but the problem looks similar. i guess the libata module is loaded before the specific pata_ali driver and that's not right. i'll try to recompile the kernel in a few days and remove the libata module. maybe it'll work. i also tried booting with disablemodules=libata in grub (as stated in the mkinitcpio wiki page), but libata is loaded anyway and i cannot find a way to blacklist it (no, in rc.conf doesn't work because it's loaded before the initscripts by mkinitcpio)

anyway, if you come up with a different solution please post it.

Offline

#4 2008-10-29 19:38:11

mci_nano
Member
From: Germany/Braunschweig
Registered: 2008-10-26
Posts: 14

Re: slow ide cdrom with via board and sata hd

silvik wrote:

i have the same motherboard and the same problem.
unfortunately, i tried to set atapi_dma=1 parameter and it works some time, but later it defaults to no dma (eg when writing a blank dvd the first 25% it's ok, at least 32x speed, and the rest 1-2x. after a reboot the same thing happens).

Oh yes, I had a second look on that issue and also recognized a slowdown after some time.

About your second Idea, blacklisting libata. I think thats not possible because its automatic loaded when sata_uli or pata_ali is loaded, its a dependency. I already blacklisted ata_generic like its written in the link you posted but with no effekt on speed. ata_generic is not longer loaded for me but there is no effect.

# lsmod | grep ata
sata_uli                7300  6 
pata_ali               13060  0 
libata                171360  2 sata_uli,pata_ali
scsi_mod              113144  4 sg,sd_mod,sr_mod,libata
dock                   11168  1 libata

I will give your idea a try too, blacklisting libata... but... lets see


Edit:
Ok I tried this and its not working. I also switched sata/pata load order.

Conclusion for now: we are not with ata_generic or other not used drivers. There must be some other problem...

maybe some idea when looking at dmesg and the sata/pata related stuff? maybe some IRQ stuff i dont know of?

libata version 3.00 loaded.
sata_uli 0000:00:12.1: version 1.3
sata_uli 0000:00:12.1: PCI INT A -> GSI 19 (level, low) -> IRQ 19
scsi0 : sata_uli
scsi1 : sata_uli
ata1: SATA max UDMA/133 cmd 0xec00 ctl 0xe480 bmdma 0xe000 irq 19
ata2: SATA max UDMA/133 cmd 0xe400 ctl 0xe080 bmdma 0xe008 irq 19
input: AT Translated Set 2 keyboard as /class/input/input1
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: ST3250410AS, 3.AAC, max UDMA/133
ata1.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata1.00: configured for UDMA/133
isa bounce pool size: 16 pages
scsi 0:0:0:0: Direct-Access     ATA      ST3250410AS      3.AA PQ: 0 ANSI: 5
pata_ali 0000:00:12.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
scsi2 : pata_ali
scsi3 : pata_ali
ata3: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xff00 irq 14
ata4: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xff08 irq 15
ata4.00: ATAPI: HL-DT-ST DVDRAM GSA-4163B, A102, max UDMA/33
ata4.00: WARNING: ATAPI DMA disabled for reliablity issues.  It can be enabled
ata4.00: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.
ata4.01: ATAPI: TOSHIBA DVD-ROM SD-M1712, 1004, max UDMA/33
ata4.01: WARNING: ATAPI DMA disabled for reliablity issues.  It can be enabled
ata4.01: WARNING: via pata_ali.atapi_dma modparam or corresponding sysfs node.
ata4.00: configured for UDMA/33
ata4.01: configured for UDMA/33

Last edited by mci_nano (2008-10-29 20:17:16)

Offline

#5 2008-11-07 07:48:48

mci_nano
Member
From: Germany/Braunschweig
Registered: 2008-10-26
Posts: 14

Re: slow ide cdrom with via board and sata hd

I switched to my gentoo installation, there is no problem with dma at all.

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
sata_uli 0000:00:12.1: version 1.3
ACPI: PCI Interrupt 0000:00:12.1[A] -> GSI 19 (level, low) -> IRQ 19
scsi0 : sata_uli
scsi1 : sata_uli
ata1: SATA max UDMA/133 cmd 0x000000000001ec00 ctl 0x000000000001e482 bmdma 0x000000000001e000 irq 19
ata2: SATA max UDMA/133 cmd 0x000000000001e400 ctl 0x000000000001e082 bmdma 0x000000000001e008 irq 19
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: ST3250410AS, 3.AAC, max UDMA/133
ata1.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata1.00: configured for UDMA/133
ata2: SATA link down (SStatus 0 SControl 300)
scsi 0:0:0:0: Direct-Access     ATA      ST3250410AS      3.AA PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3 < sda5 sda6 sda7 sda8 >
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
ACPI: PCI Interrupt 0000:00:12.0[A] -> GSI 19 (level, low) -> IRQ 19
scsi2 : pata_ali
scsi3 : pata_ali
ata3: PATA max UDMA/133 cmd 0x00000000000101f0 ctl 0x00000000000103f6 bmdma 0x000000000001ff00 irq 14
ata4: PATA max UDMA/133 cmd 0x0000000000010170 ctl 0x0000000000010376 bmdma 0x000000000001ff08 irq 15
ata4.00: ATAPI: HL-DT-ST DVDRAM GSA-4163B, A102, max UDMA/33
ata4.01: ATAPI: TOSHIBA DVD-ROM SD-M1712, 1004, max UDMA/33
ata4.00: configured for UDMA/33
ata4.01: configured for UDMA/33
scsi 3:0:0:0: CD-ROM            HL-DT-ST DVDRAM GSA-4163B A102 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 125x/125x writer dvd-ram cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 3:0:0:0: Attached scsi CD-ROM sr0
sr 3:0:0:0: Attached scsi generic sg1 type 5
scsi 3:0:1:0: CD-ROM            TOSHIBA  DVD-ROM SD-M1712 1004 PQ: 0 ANSI: 5
sr1: scsi3-mmc drive: 48x/48x cd/rw xa/form2 cdda tray
sr 3:0:1:0: Attached scsi CD-ROM sr1
sr 3:0:1:0: Attached scsi generic sg2 type 5

# hdparm -tT /dev/dvd

/dev/dvd:
Timing cached reads:   1274 MB in  2.00 seconds = 637.03 MB/sec
Timing buffered disk reads:   28 MB in  3.19 seconds =   8.76 MB/sec

# uname -r -m -p -i
2.6.23-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3700+ AuthenticAMD

In gentoo there is a selfbuild kernel with no modules for sata pata stuff. Also its a lower version. Should I try to make my own arch kernel without modules for pata/sata? Or maybe downgrade kernel for testing?
I don't realy know any possible differences between modules and in kernel but maybe some little loadtime.

Offline

#6 2008-12-14 14:07:21

mci_nano
Member
From: Germany/Braunschweig
Registered: 2008-10-26
Posts: 14

Re: slow ide cdrom with via board and sata hd

I managed it to work properbly with a custom Kernel that includes everything i needed in kernel, no modules.

CONFIG_SATA_ULI=y
CONFIG_BLK_DEV_ALI15X3=y

Hopefully the same works for you.

Offline

Board footer

Powered by FluxBB