> fossil(#S/sdC0/fossil)...version...time...
> command 30
> data f0caaaf8 limit f0cab8f8 dlen 8291 status 0 error 0
> lba 605536 -> 605536, count 16 -> 16 (16)
>  0x00 0x06 0x6A 0x3D 0x09 0xE0 0x58
> 0x40: E307 0x42: C0000x48: 00
> 0x4A: 0000
> fossil: diskWriteRaw failed: /dev/sdC0/fossil: score 0x00005529: date Sun Apr 
> 5
>  06:37:19 PDT 2009
>  part=data block 21801: i/o error

many thanks to bhuntsman for having the patience to put up
with my crappy code.

it turns out that this is due to some poor timing on the part of
virtual pc.  virtual pc asserts an interrupt while the virtual controller
is busy.  then virtual pc refuses to reassert the interrupt, though the
condition is not handled.  this problem only hapens in pio mode.

(it just occurs to me in writing this up that i had not considered that
this might be an edge vs. level irq problem.  and i'm ignorant enough
of virtual pc to not even know if that's a stupid idea or not.)

in any event, replacing the big tsleep with a loop of smaller tsleeps
and checking for missed irqs seems to help pio commands.  i also
added a kernel variable to plan9.ini, sdXXdma=on.  that might be
overkill, but i was worried about fossil/venti needing to do a lot of
disasterously slow i/o before cpurc/termrc gets a chance to run.
i'd like to hear if anyone finds that this is necessary.

one thing that is not yet done is a similar approach with packet io.
i'd like to test it with actual hardware rather than guessing.

what i've got so far is on sources in the contrib package quanstro/sd.

i'd like to hear if this works (or doesn't) for anybody else.

- erik

Reply via email to