Re: [9fans] VIA VT8237 SATA/RAID i/o errors, dma doesnt work - Plan9

This is a discussion on Re: [9fans] VIA VT8237 SATA/RAID i/o errors, dma doesnt work - Plan9 ; more information: term% pci -v 0.0.0: brg 06.00.00 1106/0314 0 VIA Technology 0.0.1: brg 06.00.00 1106/1314 0 VIA Technology 0.0.2: brg 06.00.00 1106/2314 0 VIA Technology 0.0.3: brg 06.00.00 1106/3208 0 VIA Technology PT890 CPU to PCI Bridge 0.0.4: brg ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Re: [9fans] VIA VT8237 SATA/RAID i/o errors, dma doesnt work

  1. Re: [9fans] VIA VT8237 SATA/RAID i/o errors, dma doesnt work

    more information:

    term% pci -v
    0.0.0: brg 06.00.00 1106/0314 0
    VIA Technology
    0.0.1: brg 06.00.00 1106/1314 0
    VIA Technology
    0.0.2: brg 06.00.00 1106/2314 0
    VIA Technology
    0.0.3: brg 06.00.00 1106/3208 0
    VIA Technology PT890 CPU to PCI Bridge
    0.0.4: brg 06.00.00 1106/4314 0
    VIA Technology
    0.0.7: brg 06.00.00 1106/7314 0
    VIA Technology
    0.1.0: brg 06.04.00 1106/b198 0
    VIA Technology
    0.15.0: disk 01.04.00 1106/3149 11 0:0000ff01 16 1:0000fe01 16 2:0000fd01 16 3:0000fc01 16 4:0000fb01 16 5:0000f401 256
    VIA Technology VT8237 VT6410 SATA RAID Controller
    0.15.1: disk 01.01.8a 1106/0571 10 4:0000fa01 16
    VIA Technology VT82C596x drivers
    0.16.0: usb 0c.03.00 1106/3038 10 4:0000f901 32
    VIA Technology VT83C572, VT6202 USB 2.0 Controller
    0.16.1: usb 0c.03.00 1106/3038 10 4:0000f801 32
    VIA Technology VT83C572, VT6202 USB 2.0 Controller
    0.16.2: usb 0c.03.00 1106/3038 11 4:0000f701 32
    VIA Technology VT83C572, VT6202 USB 2.0 Controller
    0.16.3: usb 0c.03.00 1106/3038 11 4:0000f601 32
    VIA Technology VT83C572, VT6202 USB 2.0 Controller
    0.16.4: usb 0c.03.20 1106/3104 5 0:fdfff000 256
    VIA Technology VT6202 USB 2.0 Enhanced Host Controller
    0.17.0: brg 06.01.00 1106/3227 0
    VIA Technology VT8237 PCI-to-ISA Bridge
    0.17.5: --- 04.01.00 1106/3059 5 0:0000f201 256
    VIA Technology VT8233/33A/8235/8237/8251 AC97 Enhanced Audio Controller - the 8251 controller is different
    0.18.0: net 02.00.00 1106/3065 10 0:0000f001 256 1:fdffe000 256
    VIA Technology VT6102 Rhine II PCI Fast Ethernet Controller
    0.20.0: net 02.00.00 10ec/8139 11 0:0000ee01 256 1:fdffd000 256
    Realtek Semiconductor RTL8139 10/100 Mbps Fast Ethernet NIC
    1.0.0: vid 03.00.00 1106/3344 10 0:f4000008 67108864 1:fb000000 16777216
    VIA Technology


    with the controller in RAID mode (this is the BIOS default) following:

    % cat /dev/sdC0/ctl
    inquiry WDC WD3200AAJS-0c0YFA0
    config 427A capabilities 2F00 dma 00550040 dmactl 00000000 rwm 16 rwmctl 0 lba48always off
    geometry 625142448 512 16383 16 63
    part data 0 625142448
    part plan9 63 625137345
    part 9fat 63 204863
    part nvram 204863 204864
    part fscfg 204864 204865
    part fossil 204865 4112641
    part 9hal.i.fossil 4112641 87998721
    part 9hal.visect0 87998721 106873089
    part 9hal.m.varena 106873089 625137345

    % cat /dev/sdD0/ctl
    inquiry SAMSUNG HD321KJ
    config 0040 capabilities 2F00 rwm 16 rwmctl 0 lba48always off
    geometry 625142448 512 16383 16 63
    part data 0 625142448
    part plan9 63 625137345
    part 9hal.vbloom 3981569 4112641
    part 9hal.i.fossil 4112641 87998721
    part 9hal.visect1 87998721 106873089
    part 9hal.m.varena 106873089 625137345

    ok, i wrote a script that tests sequencial reading/writing:

    fn rotest {
    echo rotest1 $1
    dd -if $1 -of /dev/null -bs $3 &
    sleep $2
    slay dd|rc

    echo rotest2 $1
    dd -if $1 -of /dev/null -bs $3 &
    sleep 5
    dd -if $1 -of /dev/null -bs $3 &
    sleep $2
    slay dd|rc
    }

    fn wrtest {
    echo wrtest1 $1
    dd -if /dev/zero -of $1 -bs $3 &
    sleep $2
    slay dd|rc

    echo wrtest2 $1
    dd -if /dev/zero -of $1 -bs $3 &
    sleep 5
    dd -if /dev/zero -of $1 -bs $3 &
    sleep $2
    slay dd|rc
    }

    fn rwtest {
    echo rwtest2 $1
    dd -if /dev/zero -of $1 -bs $3 &
    sleep 5
    dd -if $1 -of /dev/null -bs $3 &
    sleep $2
    slay dd|rc
    }

    slay dd|rc

    t=300
    b=65536

    for(m in off on){
    echo dma $m
    echo dma $m >/dev/sdC0/ctl
    echo dma $m >/dev/sdD0/ctl
    for(d in /dev/sdC0/9hal.m.varena /dev/sdD0/9hal.m.varena){
    rotest $d $t $b
    wrtest $d $t $b
    rwtest $d $t $b
    }
    }

    output:

    term% ./dtest.rc
    dma off
    echo: write error: bad process or channel control request
    rotest1 /dev/sdC0/9hal.m.varena
    rotest2 /dev/sdC0/9hal.m.varena
    wrtest1 /dev/sdC0/9hal.m.varena
    wrtest2 /dev/sdC0/9hal.m.varena
    rwtest2 /dev/sdC0/9hal.m.varena
    rotest1 /dev/sdD0/9hal.m.varena
    rotest2 /dev/sdD0/9hal.m.varena
    wrtest1 /dev/sdD0/9hal.m.varena
    wrtest2 /dev/sdD0/9hal.m.varena
    rwtest2 /dev/sdD0/9hal.m.varena
    dma on
    echo: write error: bad process or channel control request
    rotest1 /dev/sdC0/9hal.m.varena
    rotest2 /dev/sdC0/9hal.m.varena
    wrtest1 /dev/sdC0/9hal.m.varena
    wrtest2 /dev/sdC0/9hal.m.varena
    rwtest2 /dev/sdC0/9hal.m.varena
    rotest1 /dev/sdD0/9hal.m.varena
    rotest2 /dev/sdD0/9hal.m.varena
    wrtest1 /dev/sdD0/9hal.m.varena
    wrtest2 /dev/sdD0/9hal.m.varena
    rwtest2 /dev/sdD0/9hal.m.varena

    well, seems to work fine!

    lets use both drives in paralel (dma still enabled):

    term% dd -if /dev/sdC0/9hal.m.varena -of /dev/null -bs 65536 &
    term% dd -if /dev/sdD0/9hal.m.varena -of /dev/null -bs 65536 &
    term% read: i/o error
    13967+0 records in
    13967+0 records out

    paralel reading and writing on both drives results in:

    term% cat /dev/kprint
    command C8
    data f17fd360 limit f17ff160 dlen 65536 status 50 error 0
    lba 106889089 -> 106889119, count 128 -> 98 (15)
    0x00 0x00 0xAD 0xFF 0x5E 0xE6 0x50
    bmicx 09 bmisx 01 prdt f14df0b4
    pa 0x017FD360 count 00000CA0
    pa 0x017FE000 count 80001160
    atagenioretry: disabling dma
    sdC0: retry: dma 00000000 rwm 0000

    ok, so far for now...

    cinap


  2. Re: [9fans] VIA VT8237 SATA/RAID i/o errors, dma doesnt work

    cinap_lenrek@gmx.de wrote:

    >wrtest1 /dev/sdD0/9hal.m.varena
    >wrtest2 /dev/sdD0/9hal.m.varena
    >rwtest2 /dev/sdD0/9hal.m.varena
    >
    >well, seems to work fine!
    >
    >

    maybe a little bit too early... ran venti/wrarena on sdC0
    last night and in the morining the system was completly freezed.
    (disk led was off, screen was blank)

    :-(

    seems that my dd tests are too simple or run too shortly...
    i'll attach serial console to the machine and try to reproduce it.

    cinap



  3. Re: [9fans] VIA VT8237 SATA/RAID i/o errors, dma doesnt work

    > maybe a little bit too early... ran venti/wrarena on sdC0
    > last night and in the morining the system was completly freezed.
    > (disk led was off, screen was blank)
    >
    > :-(
    >
    > seems that my dd tests are too simple or run too shortly...
    > i'll attach serial console to the machine and try to reproduce it.
    >
    > cinap


    you may want to try a block size of 64k in your tests.
    this may make a difference.

    - erik

  4. Re: [9fans] VIA VT8237 SATA/RAID i/o errors, dma doesnt work

    erik quanstrom wrote:

    >you may want to try a block size of 64k in your tests.
    >this may make a difference.
    >
    >

    thats exactly what the dd based testscript does:

    fn rotest {
    ....
    dd -if $1 -of /dev/null -bs $3 &
    ....
    }

    ....
    b=65536

    rotest $d $t $b
    ....


    i choose that blocksize because the I/O erros printed by venti
    while i first tried to copy arenas showed that blocksize.

    i conclude for now that doing paralel io on both drives results
    in I/O errors in short time. reading/writing a single drive, the
    system hangs/freezes after many hours without a trace.


    >- erik
    >
    >

    cinap


  5. Re: [9fans] VIA VT8237 SATA/RAID i/o errors, dma doesnt work

    > i choose that blocksize because the I/O erros printed by venti
    > while i first tried to copy arenas showed that blocksize.
    >
    > i conclude for now that doing paralel io on both drives results
    > in I/O errors in short time. reading/writing a single drive, the
    > system hangs/freezes after many hours without a trace.
    >


    eh. sorry for the stupid suggestion. have you tried reducing the
    size of the reads? does it still hang with a 32k blocksize? perhaps
    plan 9 is too fast. :-).

    - erik

+ Reply to Thread