hifn(4) DMA fix for review
Oleksandr Tymoshenko
gonzo at bluezbox.com
Mon May 17 22:59:30 UTC 2010
On 2010-05-10, at 8:23 AM, Sam Leffler wrote:
>
> On May 7, 2010, at 12:13 PM, Oleksandr Tymoshenko wrote:
>
>> Proposed patch addresses hifn(4) problems on FreeBSD/mips. Current
>> implementation keeps some of the state information (indexes in
>> buffers, etc) in DMA-mapped memory and bus_dma code invalidates them
>> during sync operations. This fix moves data that doesn't belong to DMA
>> ring to softc structure.
>>
>> Patch: http://people.freebsd.org/~gonzo/hifn.diff
>> Stats for original driver:
>> http://people.freebsd.org/~gonzo/hifn.stats.orig.txt
>> Stats for patched version:
>> http://people.freebsd.org/~gonzo/hifn.stats.patched.txt
>>
>>
>
> The changes look fine and make sense (did something similar for some other drivers for when the dma data structures were mapped uncached). I can't see any performance change in your stats; but I'm just eyeballing the numbers side-by-side. Was this on x86? (where there should be zero difference) It would be good to present these numbers better (e.g. curves on the same graph, ministat output, etc).
I took some time to learn gnuplot and here is result:
http://people.freebsd.org/~gonzo/hifn-cmp.png
The red ones are data from original driver, the blue ones are patched. There are some
fluctuations but I think they're OK. I made three measurements for original drivers and
there are fluctuations too with comparable order of magnitude:
http://people.freebsd.org/~gonzo/hifn-orig.png
If it's OK - I'll commit fixes
--
gonzo
More information about the freebsd-hackers
mailing list