[U-Boot] [PATCH v1] sunxi: improve throughput in the sunxi_mmc driver

Dr. Philipp Tomsich philipp.tomsich at theobroma-systems.com
Tue Feb 21 18:11:35 UTC 2017


> On 21 Feb 2017, at 19:00, Maxime Ripard <maxime.ripard at free-electrons.com> wrote:
> 
> On Fri, Feb 17, 2017 at 06:22:45PM +0100, Philipp Tomsich wrote:
>> Throughput tests have shown the sunxi_mmc driver to take over 10s to
>> read 10MB from a fast eMMC device due to excessive delays in polling
>> loops.
>> 
>> This commit restructures the main polling loops to use get_timer(...)
>> to determine whether a (millisecond) timeout has expired.  We choose
>> not to use the wait_bit function, as we don't need interruptability
>> with ctrl-c and have at least one case where two bits (one for an
>> error condition and another one for completion) need to be read and
>> using wait_bit would have not added to the clarity.
>> 
>> The observed speedup in testing on a A31 is greater than 10x (e.g. a
>> 10MB write decreases from 9.302s to 0.884s).
>> 
>> X-Affected-platforms: A31-uQ7, A80-Q7, A64-uQ7
>> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> 
> Awesome, I was about to start looking into the poor performances we
> had, but you beat me to it.
> 
> Do you know if the same changes can apply to the Linux MMC driver?

We’ve never seen performance problems on Linux and benchmarked at
up to ~50MByte/s on the A31-uQ7.

You might want to follow up off-list with Klaus on this, though...

Cheers,
Philipp.


More information about the U-Boot mailing list