YES! I think you got it! Because atomic here doesn't mean 'do it all as
soon as possible with no delay', but 'do nothing else on the ATA bus
inbetween'.
> But that is not the real question. The real question is do we stop
> and ATOMIC process to return data of a partial completeion, and then
> return to a HALTED ATOMIC and hope it will still go?
Yes, and we can do this, and there is no reason why this should not
work.
> DEAD Method:
> issue atomic write 255 sectors
> write 8 sector or 4k or 1 page of memory
>
> interrupt_issued
> exit atomic write
> update top layer buffers
> return;
> continue write_loop;
> exit on completion and update remainder.
>
> BASTARDIZED Method:
> issue write 255 sectors
> truncate to max of 8 sectors
> issue atomic write 8 sectors
> interrupt_issued
> end request and notify 4k page complete
> make new request and merge and repeat.
> note there is a new memcpy fo new request. (max 16 to completion)
>
>
> OLD Method, with Request Page Walking:
> issue atomic write 255 sectors
> write sectors
> interrupt_issued
> walk copy of request
> continue write_loop;
> exit on completion and request and free local buffer.
>
> CORRECT Method:
> collect contigious physical buffer of 255 sectors
> memcpy_to_local (one memcpy)
> issue atomic write 255 sectors
> write sectors
> interrupt_issued
> update pointer
> continue write_loop;
> exit on completion and request and free local buffer.
>
> The price of the overhead and the direct flakyness of the driver we are
> running from is returning, so the alternative is to disable MULTI-Sector
> Operations.
That's pretty much nonsense, beg my pardon. The real correct way would
be:
issue read of 255 sectors using READ_MULTI, max_mult = 16
receive interrupt
inw() first 4k to buffer A
inw() second 4k to buffer B
don't do anything else until the next interrupt
There is absolutely no need for an intermediate scratch buffer, you can
put the inw()ed data anywhere you like, and if you need any post
processing, you can do it as well, at any time.
-- Vojtech Pavlik SuSE Labs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/