LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Disk I/O hogs CPU (https://www.linuxquestions.org/questions/linux-hardware-18/disk-i-o-hogs-cpu-569734/)

Schalken 07-16-2007 04:24 AM

Disk I/O hogs CPU
 
I like to play Tremulous and listen to music in Amarok at the same time, however I noticed the game chokes when Amarok reads the next song from my 80GB SATA hard drive.

I thought this may be due to a lack of DMA, since without DMA data has to go through the CPU to get into RAM for playback, causing the game to choke.

However, when I run hdparm I get:

Code:

tuxmachine:~ # hdparm /dev/sda

/dev/sda:
 IO_support  =  0 (default 16-bit)
 HDIO_GET_UNMASKINTR failed: Inappropriate ioctl for device
 HDIO_GET_DMA failed: Inappropriate ioctl for device
 HDIO_GET_KEEPSETTINGS failed: Inappropriate ioctl for device
 readonly    =  0 (off)
 readahead    = 256 (on)
 geometry    = 9729/255/63, sectors = 156301488, start = 0

How can I check and make sure that DMA is enabled for my SATA hard drive?

Using OpenSUSE 10.2 with KDE.

puntjuh 07-16-2007 06:58 AM

For sata disks there exists the same application as hdparm, only they named it sdparm. But did you do the hdparm in root mode ? If you haven't .. try, because AFAIK hdparm should be able to tell you.

Schalken 07-17-2007 01:32 AM

Quote:

Originally Posted by puntjuh
For sata disks there exists the same application as hdparm, only they named it sdparm. But did you do the hdparm in root mode ? If you haven't .. try, because AFAIK hdparm should be able to tell you.

Executed as root (as was hdparm previously, tuxmachine my hostname ;) ):

Code:

tuxmachine:~ # sdparm /dev/sda
    /dev/sda: ATA      WDC WD800JD-60LS  07.0
Read write error recovery mode page:
  AWRE        1
  ARRE        1
  PER        0
Caching (SBC) mode page:
  WCE        1
  RCD        0
Control mode page:
  SWP        0

... nothing about DMA, and neither does
Code:

sdparm -a /dev/sda
, unless SATA DMA has its own acronym that is one of those. ;)

adilbhilai 07-17-2007 01:39 AM

tuxmachine:~ # sdparm /dev/sda

# prompt means he is in root mode....:))

adilbhilai 07-17-2007 01:42 AM

# sdparm -a /dev/hdc will not give any info about dma

puntjuh 07-17-2007 02:04 AM

ok hdparm, doesn't tell you indeed. Anyway, about Amarok, do you perhaps have the OSD enabled? Where the picture in the above left corner pops up everytime a next song starts? This made my computer choke in games as well each time, i disabled it and gone we're my problems.

Also see output of:

dmesg | grep ata

should see a line like this:

Code:

ata1: SATA max UDMA/133 cmd 0x9F0 ctl 0xBF2 bmdma 0xE000 irq 20
ata2: SATA max UDMA/133 cmd 0x970 ctl 0xB72 bmdma 0xE008 irq 20
ata3: SATA max UDMA/133 cmd 0x9E0 ctl 0xBE2 bmdma 0xCC00 irq 16
ata4: SATA max UDMA/133 cmd 0x960 ctl 0xB62 bmdma 0xCC08 irq 16
ata5: SATA max UDMA/133 cmd 0xC800 ctl 0xC402 bmdma 0xB800 irq 17
ata6: SATA max UDMA/133 cmd 0xC000 ctl 0xBC02 bmdma 0xB808 irq 17
ata7: SATA max UDMA/133 cmd 0xF8908100 ctl 0x0 bmdma 0x0 irq 21
ata8: SATA max UDMA/133 cmd 0xF8908180 ctl 0x0 bmdma 0x0 irq 21


Schalken 07-17-2007 03:34 AM

Disabled OSD in Amarok, no difference.

And I do indeed see lines like that: :)

Code:

tuxmachine:~ # dmesg | grep dma
ata1: SATA max UDMA/133 cmd 0xBC00 ctl 0xB882 bmdma 0xB400 irq 169
ata2: SATA max UDMA/133 cmd 0xB800 ctl 0xB482 bmdma 0xB408 irq 169
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,EPP,ECP,DMA]

Does this mean that DMA is correctly enabled?


All times are GMT -5. The time now is 11:27 PM.