Home  |  Technologies  |  Corporate  |  Events  |  Careers  |  Login     Feedback   

LOCAL RESOURCES

Linux Home

Exocore Linux FAQ

PCQlinux 7.1 Configuration Files

The DMA Issue in RedHat Linux 7.1

Installing on a partition beyond 1024 cylinders

PCQL/RHL 7.1 with a SiS 6215c display card

Linux on i810

Telnet/ftp delays

Yamaha Sound Cards

Related Links

Linux International

Linux India

PCQ Linux Articles

Linux.com

Linux Weekly News

The DMA Issue in RedHat Linux 7.x

Shanker Balan and Atul Chitnis

RedHat ships a highly tuned version of the Linux kernel which enables DMA (Direct Memory Access) or even Ultra DMA on selected IDE controller chipsets.

DMA based transfers greatly reduce install time by providing faster file transfer speeds. DMA also reduces CPU usage to a large extent for disk activity.

Because of the above mentioned benefits, DMA is a highly desirable feature and in most cases, the DMA enabled kernel works like a charm.

(For more on the benefits of using DMA transfers see http://www.linuxdoc.org/HOWTO/mini/Ultra-DMA.html)

However, enabling DMA has its downside. It requires that all the components of your system are "healthy". If there is a hardware related problem in any one of the related system components, DMA will fail to function properly.

Slow and unreliable installs, CRC errors, file corruptions and even random system lockups are all symptoms of DMA related problems.

The most common issues seen are

  • the installer dies when booting, after issuing the message "running: /sbin/loader"

  • installation is extremely slow and often dies at a particular point, but never the same for different users/machines

  • installation suddenly stops complaining about a missing/bad file

  • the CDROM is not accessible after installation

Q. Ok, so how can I fix the installation problem?

A. To fix the problem, boot off the CD, then, at the boot prompt type

linux ide=nodma

This disables DMA access while installing.

Q. Whew, I disabled DMA with "ide=nodma" and the install completed! But now I seem to be having problems while running normally? Is this also DMA related?

A. Most probably yes as the "ide=nodma" option does not disable DMA permanently - it only disables DMA for the current session.

Q. So how do I disable DMA permanently?

A. Depending on how the CDROM drive has been physically connected to your system, add one of these lines to /etc/rc.d/rc.sysinit:
/sbin/hdparm -d0 /dev/hdb   # Add this if your CDROM is on primary slave
/sbin/hdparm -d0 /dev/hdc   # Add this is your CDROM is on secondary master
/sbin/hdparm -d0 /dev/hdd   # Add this if your CDROM is on secondary slave
If you are unsure about the CDROM device id, the "dmesg" output will have it:
~# dmesg|grep CD
hdc: ATAPI 48X CDROM, ATAPI CD/DVD-ROM drive
hdc: ATAPI 48X CD-ROM drive, 128kB Cache, 
     UDMA(33) Uniform CD-ROM driver Revision: 3.12
In this case, CDROM drive is /dev/hdc.

Q.I disabled DMA for the CDROM drive. I still have problems while accessing files. Everything is too slow and the hardisk light remains on for a looong time

A. Looks like your harddisk also cannot handle DMA.

To disable DMA for a hard drive, add this line to /etc/rc.d/rc.sysinit.

/sbin/hdparm -d0 /dev/hda

This should cure most DMA related problems.

Q. How can I fix DMA related problems so that I can take advantage of its benefits?

A. Some of the more common reasons for DMA problems are:
  • Bad or loose IDE connectors. Replacing or securing them usually solves the problem.

  • Broken BIOS. Check with your motherboard/PC manufacturer for DMA related problems with the BIOS. The early Asus P5A motherboards for example had problems in Linux if DMA was enabled. Upgrading the BIOS usually fixes the problem.

  • Broken IDE chipset. This is something which cannot be cured without a hardware change. There are many motherboards shipped with broken controllers which cause data corruption if DMA is enabled. We have one such board in our office. :(

    See "Are those rumors about buggy interfaces true?" at http://thef-nym.sci.kun.nl/cgi-pieterh/atazip/atafq-3.html#ss3.3

  • Old IDE devices (hard disks, CDROM drives) don't respond well to DMA.

  • Some drive/controller combinations will work with DMA but not UDMA. You can test this out by playing around with "hdparm" settings.

Q. Where can I find out more about Linux and (U)DMA?

A. See the The Linux Ultra-DMA Mini-Howto at http://www.linuxdoc.org/HOWTO/mini/Ultra-DMA.html

Q. But other distributions like SuSE and Debian install fine on the same machine. Even RedHat Linux 6.2 which PCQuest distributed work fine. Why so?

A. Other Linux distribution like Debian and SuSE do not enable DMA by default on the installer (or on their default kernels) just like the earlier releases of RedHat Linux which is probably why you never had a similar problem before.

On these systems, you can enable DMA manually using the "hdparm" command.

See the PCQuest article Fine tuning your Linux machine http://www.pcquest.com/archive/articledetail.asp?arid=11733

Update:

In response to a posting about this article on Linux Weekly News, RedHat has added the following information:
From:    "Michael K. Johnson" <johnsonm@redhat.com>
To:      editor@lwn.net
Subject: Comment on exocore article
Date:    Mon, 09 Jul 2001 12:18:09 -0400


You pointed to an article regarding IDE DMA being enabled in
Red Hat Linux 7.1 at http://www.exocore.com/linux/rhl71dma/

There is one critical piece of information to add to that article.
If you need to use the ide=nodma flag to install, please, PLEASE
send us the model information for your CDROM drive so that we can
add it to the "blacklist" of CDROM drives that are incompatible with
DMA.  This will make your life easier installing new versions of
Red Hat Linux, and will help everyone else with that model as well.

In order to provide us with that information, submit a bug report via
http://bugzilla.redhat.com/bugzilla

Assuming your CDROM drive is "hdc", include the exact output of
cat /proc/ide/hdc/model

Thanks!

I'd send this email to exocore as well except that they insist on
web forms rather than providing an email address for feedback.

michaelkjohnson

 "He that composes himself is wiser than he that composes a book."
 Linux Application Development                     -- Ben Franklin
 http://people.redhat.com/johnsonm/lad/

It would have been nice if RedHat would have provided an email address to send such information to, rather than forcing people to register and fight their way through bugzilla to deliver such information.