On Thu, Jun 27, 2013 at 12:04 AM, Tomasz Figa tomasz.figa@gmail.com wrote:
+#define MAX_NUM_TSFR_LLIS 512
And I like this nice side effect that we allocate a number of LLIs rather than a fixed-size buffer.
As we're at it, is there any reason to choose this particular number of LLis? I have calculated it from the buffer size defined originally, but I wonder if 512 LLIs for single transfer isn't too much?
Hm that would be some kind of rule-of-thumb thing.
It depends on the typical DMA request size divided by the max bytes you can stash into an LLI in the smallest case.
For example when issueing things like this:
dd if=/dev/mmc0 of=/dev/null
you can get *really* large LLI lists, maybe if you want to make a real engineering exercise you could instrument the code to accumulate a few stats and run this stressful usecase on the S3C and see where you end up?
Then calculate backwards for the smaller LLI chunks of the unmodified PL08x and get a proper estimate.
One way forward would be not to hardcode this as a #define but making it a field of the vendor data I guess.
Yours, Linus Walleij