Moj problem spociva v tom ze sa mi neda zapnut na mojich sata diskoch DMA. Vzhladom na to ze bez DMA mi hdparm -t pise rychlost cca 3.5MB/s, (co je na moj vkus pomerne DOST malo) chcel som si DMA zapnut.
V kerneli mam zapnuty aj DMA engine, aj podporu pre moj chipset.
Distro: Gentoo
Kernel: 2.6.22-gentoo-r5
Error pri zapinani DMA:
localhost ~ # hdparm -d1 /dev/hda
/dev/hda:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
Vypis s lspci:
localhost ~ # lspci -v | grep SATA
00:1f.2 IDE interface: Intel Corporation SATA Controller 1 IDE (rev 02) (prog-if 8a [Master SecP PriP])
00:1f.5 IDE interface: Intel Corporation SATA Controller 2 IDE (rev 02) (prog-if 85 [Master SecO PriO])
Podrobnejsie info:
00:1f.5 IDE interface: Intel Corporation SATA Controller 2 IDE (rev 02) (prog-if 85 [Master SecO PriO])
Subsystem: Fujitsu Siemens Computer GmbH Unknown device 10b6
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 16
I/O ports at 1c48 [size=8]
I/O ports at 1c3c [size=4]
I/O ports at 1c40 [size=8]
I/O ports at 1c38 [size=4]
I/O ports at 1c10 [size=16]
I/O ports at 1c00 [size=16]
Capabilities: [70] Power Management version 3
Dalsie vypisy:
localhost ~ # hdparm -i /dev/hda
/dev/hda:
Model=WDC WD1600JS-55NCB1, FwRev=10.02E01, SerialNo=WD-WCANMA411650
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
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 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
A dalsi vypis:
localhost ~ # hdparm /dev/hda
/dev/hda:
multcount = 16 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 19457/255/63, sectors = 312581808, start = 0
A vypis z dmesg:
localhost ~ # dmesg | grep dma
eth0: dma_rwctrl[76180000] dma_mask[64-bit]
ata1: SATA max UDMA/133 cmd 0x00011c48 ctl 0x00011c3e bmdma 0x00011c10 irq 16
ata2: SATA max UDMA/133 cmd 0x00011c40 ctl 0x00011c3a bmdma 0x00011c18 irq 16
Keby mi niekto vedel pomoct bol by som velmi povdacny lebo takato rychlost je dost neprijemna.
Dik
-c1 -u1 -d1 -Xudma5
localhost ~ # hdparm -c1 -u1 -d1 -Xudma5 /dev/hda
/dev/hda:
setting 32-bit IO_support flag to 1
setting unmaskirq to 1 (on)
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
setting xfermode to 69 (UltraDMA mode5)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 0 (off)
Hm UDMA je nezavisle na DMA? lebo ako moze zapnut UDMA ked DMA mu pise ze operation not permitted
ale mozes skusit porovnat benchmark s nastavenim PIO-4
-X12
Pre tych ktori budu mat podobny problem:
Bolo treba zapnut AHCI v biose -> zacal tie moje disky detekovat ako /dev/sdX a nie ako /dev/hdX. Potom trebalo mat zapnutu podporu v kerneli (bacha na to nie ako modul, ale zakomponovat do jadra -> toto bola chyba na ktorej som sa drzal najdlhsie).
A potom vsetko ide ako ma, hdparm -tT:
localhost ~ # hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 2302 MB in 2.00 seconds = 1151.40 MB/sec
Timing buffered disk reads: 166 MB in 3.01 seconds = 55.22 MB/sec
Ked to porovname s predchadzajucou rychlostou (okolo 3.5MB/s, po hrajkani sa s tym bolo 7MB/s) tak je to tak 10x narast rychlosti :)
Diki sa pomoc ;)
initrd.img
, nie?Kedze som mal uz dosku s podobnym chovanim, viem ze SATA disk/radic ide prepnut do modu, kde bol kompatibilny s PATA (ide to jedine na Intel chipsetoch, nVidia taku fnc nikdy nezaviedla). V linuxe sa disky ukazali ako
hdx
, vo winxp nebolo treba davat SATA disketu pred instalaciou.Po prepnuti na AHCI sa radic/disk zacali spravat SATO-vsky. Cize oznacenie
sdx
, nepotrebnyhdparm
a hlavne sa zapne NCQ (ak niekto na tom bezi SQL server, je to celkom vhod fnc).Preto si myslim, ze ma SATA disk a niektory z tych chipsetov s oznacenim ICH na juznom moste.
> lspci | grep ICH
> nist
a pocul som o tom, ze nforce ma compatibility mode tiez
hdparm (alebo podobne programy) sa zidu aj na SATA disky, ale nie na nastavovanie IDE-only veci