# Hard Drive DMA and ReiserFS

## Lethy

When booting up, when the computer checks the root filesystem (currently reiserfs) it gives a nice little warning boxed in asterix telling me that DMA is currently disabled and thus may cause disk processes to be slow. But I believe DMA is actually enabled. My boot partition is ext3 and when it checks /boot, I get no error concerning DMA and they are both on the same hard drive.

Am I missing a kernel setting I didn't compile in or have I messed a config file somewhere? I couldn't find much DMA settings for the kernel besides "Use PCI DMA by default when available" when is currently compiled into the kernel. dmesg doesn't show any errors concerning DMA either. I'm unsure as to what logs, if any logs I could show so please if there are any, list them and I'll grab them for you.

Following is my /etc/fstab in case it has something do to with that.

```
# <fs>                <mountpoint>  <type>        <opts>           <dump/pass>

/dev/hda2             /boot         ext3          noauto,noatime          1 1

/dev/hda4             /             reiserfs      noatime,noauto          0 0

/dev/hda3             none          swap          sw                      0 0

/dev/cdroms/cdrom0    /mnt/cdrom0   iso9660       noauto,ro               0 0

/dev/cdroms/cdrom1    /mnt/cdrom1   iso9660       noauto,ro               0 0

proc                  /proc         proc          defaults                0 0
```

----------

## dberkholz

```
desktop root #  cat /proc/ide/hda/settings 

name                    value           min             max             mode

----                    -----           ---             ---             ----

...

using_dma               1               0               1               rw

...
```

A value of 1 means dma is on. If it isn't, do this:

```
# rc-update add hdparm default

# /etc/init.d/hdparm start
```

You can set hdparm parameters in /etc/conf.d/hdparm, but it enables DMA by default.

----------

## Lethy

Excellent, added: 

```
hdparm -d1 -A1 -m16 -u1 -a64 /dev/hda
```

 and then did what you said. Worked perfectly and DMA is now enabled according to: 

```
cat /proc/ide/hda/settings
```

Thanks alot spyderous, greatly appreciated.

----------

## amd

 *Quote:*   

> 
> 
> When booting up, when the computer checks the root filesystem (currently reiserfs) it gives a nice little warning boxed in asterix telling me that DMA is currently disabled and thus may cause disk processes to be slow. But I believe DMA is actually enabled. My boot partition is ext3 and when it checks /boot, I get no error concerning DMA and they are both on the same hard drive. 
> 
> 

 

Usually this message happens, when kernel is misconfigured... and this isn't a "nice little warning box"  :Wink: 

In kernel conf under:

```
ATA/IDE/MFM/RLL support  --->

|--->IDE, ATA and ATAPI Block devices  --->
```

Then search for 

```
"[ ]   Generic PCI IDE chipset support"
```

 and enable it...

this will add some more options to your kernel conf tree...

```

 [*]   Generic PCI IDE chipset support     

   [*]     Sharing PCI IDE interrupts support (NEW)                    

   [*]     Generic PCI bus-master DMA support (NEW)        <--- Set this![/b]

   [ ]     Boot off-board chipsets first support (NEW)                 

   [ ]       Force enable legacy 2.0.X HOSTS to use DMA (NEW)  

   [*]       Use PCI DMA by default when available (NEW)         <--- and this![/b]

```

and below is the list of IDE chipsets... make sure you enable at least one of them according to your hardware  :Wink: 

After that make dep && make bzImage and...  (all the usual commands here  :Wink:  )

Oh... this works with other filesystems as well... not only reiserfs..

----------

## try_fail_try

I too am having this same problem on my laptop.  After following the instructions on this thread DMA shows that it is on when I:

```
cat /proc/ide/hda/setting
```

However, I still get the warning at bootup that DMA is not enabled.  I just installed 1.4 rc2, which I had done a couple months ago on this same laptop without this problem.  It also was much quicker (I'm assuming because of the DMA issue).

Any help is appreciated.

----------

## Celtis

Same here, I have 'rc-update add hdparm default'-ed my machine any yet I still get the warning message everytime I boot. I did notice that hdparm isn't started until long after I get the message, would I be better trying 'rc-update add hdparm boot' instead?

Thanks,

Celtis

----------

## zerbet

I've got the same problem: The messages are issued by /etc/init.d/checkroot and checkfs which are run before any script, and in particular hdparm, which then turns on dma. How can I get rid of those ugly messages?

Thanks

Zerbet

----------

## TerminalAddict

```

trinity root # hdparm -tT /dev/hda

/dev/hda:

 Timing buffer-cache reads:   636 MB in  2.00 seconds = 318.00 MB/sec

 Timing buffered disk reads:   18 MB in  3.12 seconds =   5.77 MB/sec

trinity root # 

```

 :Sad: 

```

trinity root # hdparm -d1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

trinity root # 

```

 :Confused: 

there are no options in bios  to turn on/off DMA but my bios reports udma66 when booting.

I have this board http://www.giga-byte.com/MotherBoard/Products/Products_GA-6VXD7.htm

and a brand new seagate 120gig with 8mb cache

here's a bit of my kernel config

```

  x x [*]   PCI IDE chipset support                                       x x

  x x [*]     Generic PCI IDE Chipset Support                             x x

  x x [*]     Sharing PCI IDE interrupts support                          x x

  x x [*]     Generic PCI bus-master DMA support                          x x

  x x [ ]     Boot off-board chipsets first support                       x x

  x x [ ]       Force enable legacy 2.0.X HOSTS to use DMA                x x

  x x [*]       Use PCI DMA by default when available                     x x

  x x [ ]     Enable DMA only for disks                                   x x

  x x [ ]       ATA Work(s) In Progress (EXPERIMENTAL)                    x x

```

can anybody help?

----------

## Kabuto

Try adding the VIA82CXXX support for the Gigabyte.  There was also and Enhance ATAPI... in the BIOS, try enabling that.

----------

## spindizy

 *Quote:*   

> 
> 
> ```
> 
> trinity root # hdparm -d1 /dev/hda
> ...

 

I have an IBM 704 Server, No settings in the bios about DMA, and I get the same errors about not being able to set DMA on with hdparm -d1 /dev/hda .. Kernel config looks the same as the snippet above.  

Any idea's?

----------

## Caffeine

I'm having the same problem:

```
 # hdparm -d1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

I'm running 2.6-test3-bk1 on an ABIT KT7 mother board. I've 3 harddrives, 

/dev/hda - motherboard ide - no DMA

/dev/hdd - motherboard ide - no DMA

/dev/hdg - HPT366 controller - DMA ok

I've inserted the via82cxxx module...

```
# modprobe via82cxxx

Segmentation fault

```

But it does get inserted according to lsmod.

Any ideas?

----------

## Caffeine

Looks like the modprobing of via82cxxx was the problem. After a reboot, the module installed correctly and DMA can be set.

----------

