Am I really using DMA?

Submitted by kushalkoolwal
on July 12, 2006 - 4:38pm

I have a computer with the following lspci output:
root@debian:~# lspci
00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:01.0 PCI bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to AGP Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 82)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 02)
02:04.0 Ethernet controller: Intel Corporation 8255xER/82551IT Fast Ethernet Controller (rev 10)
02:05.0 Ethernet controller: Intel Corporation 8255xER/82551IT Fast Ethernet Controller (rev 10)

The problem is that in my dmesg I get the following lines from the my IDE controller driver:
ICH4: IDE controller at PCI slot 0000:00:1f.1
ICH4: chipset revision 2
ICH4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xdc00-0xdc07, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xdc08-0xdc0f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...

Everything above looks fine except that BIOS settings shows that my IDE devices are in PIO mode but when I try to print out the information from hdparm it seems that it is using the UDMA mode 5 which is the correct expected behaviour.
Here are some outputs from hdparm:

root@debian:~# hdparm -i /dev/hda

/dev/hda:

Model=WDC WD800BB-22JHC0, FwRev=05.01C05, SerialNo=WD-WMAM95758510
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=66
BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=off
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
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 udma3 udma4 *udma5
AdvancedPM=no WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6

* signifies the current active mode

root@debian:~# hdparm /dev/hda

/dev/hda:
multcount = 0 (off)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 65535/16/63, sectors = 156301488, start = 0
root@debian:~#

and finally the performance test:
root@debian:~# hdparm -tT /dev/hda

/dev/hda:
Timing cached reads: 2004 MB in 2.00 seconds = 1003.95 MB/sec
Timing buffered disk reads: 170 MB in 3.03 seconds = 56.07 MB/sec
root@debian:~#

All the above 3 output indicates that my IDE Hard drive is in UDMA mode.

So why do I get the following message in the dmesg output????
ide0: BM-DMA at 0xdc00-0xdc07, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xdc08-0xdc0f, BIOS settings: hdc:pio, hdd:pio

Does it mean that although the BIOS shows that it is in PIO mode the linux kernel is overriding that fact and uses the DMA mode. I want to use the DMA mode too but because the outputs were conflicting I got confused. I have verified my BIOS settings and UDMA for the Primary and Secondary controller are enabled.

Any clues?

Thanks

Oops forgot to mention that I

kushalkoolwal
on
July 12, 2006 - 4:40pm

Oops forgot to mention that I am using Debian etch (Kernel 2.6.15) .

Unless the device is a raid (

Anonymous (not verified)
on
July 12, 2006 - 10:53pm

Unless the device is a raid (1+), you should never be able to get 56 mb/s buffered reads (on an ide device) without having dma enabled, so I think you can be pretty sure that dma is enabled.

The kernel message may simply mean that the kernel is ignoring that the bios is set to pio, or something like that.

Thanks for clarifying this...

Anonymous (not verified)
on
July 13, 2006 - 2:17am

Thanks for clarifying this...Even I was thinking on the same line but I was not sure....Thanks once again..

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.