via686芯片是支持 udma5的, 硬盘也是支持udma5的, 但是盒子只能mda33, 从dmesg里面可以
看出来, 是因为电缆不是80芯的, 但如此短的硬盘线,应该支持高速dma。
所以我们只要强制打开dma66选项就可以了。 只要给内核参数传递一个"ide0=ata66"的参数.具体实施就是
开机进pmon
pmon>set karg "root=/dev/hda1 console=tty ide0=ata66"
就行了。
进去后测一下:
#hdparm -i /dev/hda
/dev/hda:
Model=HTS421240H9AT00, FwRev=HACOA70S, SerialNo=HKA04CAHDKR90L
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=DualPortCache, BuffSize=1570kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
IORDY=on/off, tPIO={min:240,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=yes: mode=0x80 (128) WriteCache=enabled
Drive conforms to: ATA/ATAPI-7 T13 1532D revision 1: ATA/ATAPI-2,3,4,5,6,7
* signifies the current active mode
debian:/home/liushiwei# hdparm -tT /dev/hda
/dev/hda:
Timing cached reads: 246 MB in 2.00 seconds = 122.92 MB/sec
Timing buffered disk reads: 86 MB in 3.04 seconds = 28.33 MB/sec
没加ata66之前:
/dev/hda:
Timing cached reads: 254 MB in 2.01 seconds = 126.23 MB/sec
Timing buffered disk reads: 72 MB in 3.05 seconds = 23.64 MB/sec
2008-10-05
ide0=ata66 参数失效,找到一个新的参数, 可以关闭80芯ide电缆测试, 强制打开ata100
ide_core.ignore_cable=0