Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Linux

Author: Gian-Carlo Pascutto

Date: 03:55:24 05/12/01

Go up one level in this thread


On May 12, 2001 at 06:15:41, Frank Phillips wrote:

>I am using Mandrake7.2 (final) as supplied.  Kernel 2.2.?  (14 or 16 I think).

First suggestion would be, if you are able to, to upgrade to the
lastest kernel (2.4.4). 2.4 has many improvements which are important
in situations such as these.

The problem is that your drive is being used in PIO mode instead of
DMA mode. In DMA mode the copying of data between the disk and your
RAM is done by a special chip on the motherboard instead of the CPU.
The CPU is then free to do other things (such as looking for input).

Normally the DMA is enabled by compiling in the right driver for
your motherboard when compiling the kernel. If you are using the
stock kernel that comes with your distribution there is a good
chance it does not have this support. On the other hand compiling
your own kernel takes a lot of knowledge about your system and is
something which you might not want to do.

If the DMA support in the kernel is enabled you will see something
like this (dmesg):
------------------------------------------------------------------
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller on PCI bus 00 dev 39
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci00:07.1
    ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:DMA, hdd:DMA
hda: Maxtor 5T040H4, ATA DISK drive
hdc: Pioneer DVD-ROM ATAPIModel DVD-116 0107, ATAPI CD/DVD-ROM drive
hdd: Hewlett-Packard CD-Writer Plus 9100b, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 80043264 sectors (40982 MB) w/2048KiB Cache, CHS=4982/255/63, UDMA(100)
------------------------------------------------------------------

Notice the UDMA(100) on the last line, which indicates this drive is
being used in Ultra DMA 100 mode (the fastest available at this moment)

If you will not recompile your kernel there are two other things you
can do:

su to root, then use

hdparm -d 1 /dev/hda  (replace hda by ...)

and

hdparm -u 1 /dev/hda (same ... )

The first line will try to force to enable DMA support by the kernel.
This will probably not enable the best DMA mode buy it may be enough
to solve your problems.

The second line will allow the CPU to handle input while it is processing
disk data. This generally makes the system more responsive during
diskaccess too.

Be aware that enabling these options may result in filesystem corruption
if there are serious incompatibilities between the kernel and your HD/Disk
controller. I have never had a problem with these options on all systems
I have used though.

And of course, if something does go wrong, you can always restore from
your backups. You do have those don't you? :)

--
GCP



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.