[alsa-devel] [RFC PATCH v2 03/12] dmaengine: PL08x: Rework LLI handling to be less fragile

Linus Walleij linus.walleij at linaro.org
Thu Jun 27 11:31:06 CEST 2013


On Thu, Jun 27, 2013 at 12:04 AM, Tomasz Figa <tomasz.figa at 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


More information about the Alsa-devel mailing list