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

Dr. Philipp Tomsich philipp.tomsich at theobroma-systems.com
Mon Feb 20 09:05:01 UTC 2017


> On 20 Feb 2017, at 07:16, Chen-Yu Tsai <wens at csie.org> wrote:
> 
> On Mon, Feb 20, 2017 at 6:08 AM, Jaehoon Chung <jh80.chung at samsung.com <mailto:jh80.chung at samsung.com>> wrote:
>> Hi,
>> 
>> On 02/18/2017 02:22 AM, 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).
>> 
>> Your patch's format looks strange.
>> Some unchanging codes are included in patches.
>> Except them, Looks good to me.
>> If you will resend the patch, you can resend with my acked-by tag.
> 
> They were probably produced the patches with "git format-patch
> --function-context", which includes the whole body of any changed
> functions.

Yes, that’s my default setting for easier review (having the context helps
spotting logic-issues, in my experience).

I’ll just reroll with less context for a v2, as the consensus prefers the
smaller context.

Regards,
Phil.


More information about the U-Boot mailing list