# Slow IDE drive

## kazzmir

I seem to get very slow IO rates with my new computer.

```

dynamo kazzmir # hdparm -tT /dev/hda

/dev/hda:

 Timing cached reads:   3824 MB in  2.00 seconds = 1911.30 MB/sec

 Timing buffered disk reads:    4 MB in  3.63 seconds =   1.10 MB/sec

dynamo kazzmir #

```

I cant seem to enable dma:

```

dynamo kazzmir # hdparm /dev/hda

/dev/hda:

 multcount    =  0 (off)

 IO_support   =  0 (default 16-bit)

 unmaskirq    =  0 (off)

 using_dma    =  0 (off)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 30401/255/63, sectors = 250059350016, start = 0

dynamo kazzmir # hdparm -d 1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

dynamo kazzmir # 

```

Its an ATI IDE chipset:

```

dynamo kazzmir # lspci

00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 10)

00:02.0 PCI bridge: ATI Technologies Inc RS480 PCI-X Root Port

00:11.0 IDE interface: ATI Technologies Inc ATI 437A Serial ATA Controller

00:12.0 IDE interface: ATI Technologies Inc ATI 4379 Serial ATA Controller

00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller

00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller

00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller

00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 11)

00:14.1 IDE interface: ATI Technologies Inc Standard Dual Channel PCI IDE Controller ATI

00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge

00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge

00:14.5 Multimedia audio controller: ATI Technologies Inc IXP SB400 AC'97 Audio Controller (rev 02)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: nVidia Corporation GeForce 7300 GS (rev a1)

02:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

02:06.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)

dynamo kazzmir #

```

This is the ide part of the kernel configuration:

```

CONFIG_IDE_GENERIC=y

# CONFIG_BLK_DEV_CMD640 is not set

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

# CONFIG_BLK_DEV_OFFBOARD is not set

CONFIG_BLK_DEV_GENERIC=y

# CONFIG_BLK_DEV_OPTI621 is not set

# CONFIG_BLK_DEV_RZ1000 is not set

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_BLK_DEV_IDEDMA_FORCED=y

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

# CONFIG_BLK_DEV_AEC62XX is not set

CONFIG_BLK_DEV_ALI15X3=m

# CONFIG_WDC_ALI15X3 is not set

CONFIG_BLK_DEV_AMD74XX=y

CONFIG_BLK_DEV_ATIIXP=y

CONFIG_BLK_DEV_CMD64X=m

CONFIG_BLK_DEV_TRIFLEX=m

CONFIG_BLK_DEV_CY82C693=m

CONFIG_BLK_DEV_CS5520=m

CONFIG_BLK_DEV_CS5530=m

CONFIG_BLK_DEV_HPT34X=m

# CONFIG_HPT34X_AUTODMA is not set

CONFIG_BLK_DEV_HPT366=m

CONFIG_BLK_DEV_SC1200=m

CONFIG_BLK_DEV_PIIX=y

# CONFIG_BLK_DEV_IT821X is not set

CONFIG_BLK_DEV_NS87415=m

CONFIG_BLK_DEV_PDC202XX_OLD=m

CONFIG_PDC202XX_BURST=y

CONFIG_BLK_DEV_PDC202XX_NEW=m

CONFIG_BLK_DEV_SVWKS=m

# CONFIG_BLK_DEV_SIIMAGE is not set

CONFIG_BLK_DEV_SIS5513=m

CONFIG_BLK_DEV_SLC90E66=m

CONFIG_BLK_DEV_TRM290=m

CONFIG_BLK_DEV_VIA82CXXX=m

# CONFIG_IDE_ARM is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_BLK_DEV_HD is not set

```

Doing any IO causes the system to severly lag. Any suggestions?

----------

## Philantrop

Did you try to activate DMA (hdparm -d 1 /dev/hda) as root?

----------

## kazzmir

Yes, I did everything I listed above as root.

----------

## bollucks

Try disabling the generic IDE driver. Sometimes it takes precedence over the proper chipset driver.

----------

## kazzmir

 *Quote:*   

> 
> 
> Try disabling the generic IDE driver. Sometimes it takes precedence over the proper chipset driver.
> 
> 

 

F***ing brilliant. That solved it.

----------

## Kaji_Ryoji

It also worked for me (with VIA82xx chipset)

----------

## oandarilho01

Saddly it doesn't worked for me. I'm using via82xx too and already disabled

-> generic/default IDE chipset support                       AND

-> Generic PCI IDE Chipset Support

but even this way my HD works very slow..

Should i disable another features like

-> CMD640 chipset bugfix/support                          AND/OR

-> RZ1000 chipset bugfix/support

??

Well, after read the help available for RZ1000 option, i'll try to disable both fetures and test. Maybe i'll try to refer my old kernel configuration to see how it  was configured, and i return here to tell the results..

By the way, how can I copy the entire configuration of a kernel? If I'm changing from 2.6.16.x to 2.8.x.x (hypothesis), there's a way to copy the configuration previously made to ensure the new kernel functionality? I've already seen someone doing this, but i've forgot how to do..

(please forgive my porr english..   :Confused:  )

----------

## NeddySeagoon

oandarilho01,

Post the output of

```
uname -a
```

and 

```
lspci
```

There is a new via IDE chipset that needs a ver y recent kernel to make DMA work. Maybe you have one of those?

----------

## oandarilho01

bruno oandarilho01 # uname -a

Linux bruno 2.6.16-gentoo-r7 #1 SMP PREEMPT Mon May 15 14:46:32 UTC 2006 i686 AMD Athlon(tm) XP 1600+ GNU/Linux

bruno oandarilho01 # lspci

00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 03)

00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP]

00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40)

00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a)

00:07.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a)

00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)

00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 50)

00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

00:0c.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 61)

00:0c.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 61)

00:0c.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 62)

01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 300/305 PCI/AGP VGA Display Adapter (rev 90)

I think that's not my case, 'case I'm using  a Soyo K7VTA Pro, whose is kind an old mobo.

And I used to run another instalation of gentoo (2.6.14.x) that runs ok..

----------

## oandarilho01

But what about disable the two features i've mentioned?

----------

## NeddySeagoon

oandarilho01,

That combination of kernel and hardware should work. 

Your kernel was compiled on Mon May 15 14:46:32 UTC 2006 is that correct?

If you have a more recent one, you are not using it.

What does 

```
grep CONFIG_BLK_DEV_VIA82CXXX /usr/src/linux/.config
```

 show

CONFIG_BLK_DEV_VIA82CXXX=y is the right answer for you.

----------

## oandarilho01

The answer is y

bruno oandarilho01 # grep CONFIG_BLK_DEV_VIA82CXXX /usr/src/linux/.config

CONFIG_BLK_DEV_VIA82CXXX=y

what now?

----------

## NeddySeagoon

oandarilho01,

When did you last compile your kernel ?

----------

## btlee

same experience here.

The problem happened on ppc and kernel 2.6.16, for me.

Back to 2.6.15 fixed the problem.

----------

## bollucks

You want this one unset:

< >     generic/default IDE chipset support

And these set:

[*]     PCI IDE chipset support

[*]       Generic PCI bus-master DMA support

[*]         Use PCI DMA by default when available

----------

## oandarilho01

NeddySeagoon,

my last compilation was yesterday, a little before my last post here..

***

btlee,

I got it..Maybe I'll try something this way..

----------

## oandarilho01

 *btlee wrote:*   

> same experience here.
> 
> The problem happened on ppc and kernel 2.6.16, for me.
> 
> Back to 2.6.15 fixed the problem.

 

....... And it solved the problem for me too.

Thanks to you all for the help!!

Gentoo rules!

----------

## NeddySeagoon

oandarilho01,

Ah ... that would be May 22nd then ... but the kernel you were running was made on Mon May 15 14:46:32 UTC 2006.

Thats what

```
 uname -a
```

shows.

That tells me you are not running the kernel made from the .config you checked. You have installed your kernel incorrectly, or your PC clock is about a week slow. Did you mount boot for the install ?

You may find that your IDE speed is fine when you run your new kernel.

----------

