Re: DMA not working on SATA?

Previous thread: [BUG] Linux 2.6.24.x and 2.6.25-rc1-6 boot freeze by Tarkan Erimer on Wednesday, March 26, 2008 - 4:38 am. (1 message)

Next thread: [PATCH 1/1] Input/Joystick Driver: add support AD7142 joystick driver by Bryan Wu on Wednesday, March 26, 2008 - 9:00 pm. (5 messages)
To: LKML <linux-kernel@...>
Date: Wednesday, March 26, 2008 - 5:59 am

Hi,

Since I got my new machine I noticed it seemed to be running slower than
I expected for a duel core machine including a lot of stuttering. After
tweaking the BIOS settings from "Legacy" to "AHCI" I measured a doubling
of read performance with hdparm but heavy IO still makes the machine
sluggish, with top showing ~80% of the time in the wait state (and
loadavg shooting up). This seems like a DMA problem because I was under
the impression a task demanding IO should be able to sleep on a DMA
completion rather than blocking everything else.

Looking with hdparm I get the following info on my disk:

root@pitcairn:/home/ajb# hdparm -v -i /dev/sda

/dev/sda:
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 19457/255/63, sectors = 312581808, start = 0

Model=ST3160815AS , FwRev=3.AAD , SerialNo= 6RA38XMD
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 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,2,3,4,5,6,7

* signifies the current active mode

Which seems to indicate DMA is supported but not on. Attempting to
switch it on with -d just fails:

root@pitcairn:/home/ajb# hdparm -v -d 1 /dev/sda

/dev/sda:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Inappropriate ioctl for device
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 19457/255/63, sectors = 312581808, start = 0

I'm currently running an Ubuntu (7.10) distro kernel although I can get
a test kernel running if it helps ...

To: Alex Bennee <kernel-hacker@...>
Cc: LKML <linux-kernel@...>
Date: Wednesday, March 26, 2008 - 5:56 am

And any problems beyond that point are ones you need to take up with
Nvidia as they have all the source code but we don't have theirs.
--

Previous thread: [BUG] Linux 2.6.24.x and 2.6.25-rc1-6 boot freeze by Tarkan Erimer on Wednesday, March 26, 2008 - 4:38 am. (1 message)

Next thread: [PATCH 1/1] Input/Joystick Driver: add support AD7142 joystick driver by Bryan Wu on Wednesday, March 26, 2008 - 9:00 pm. (5 messages)