qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V4 10/12] SD card users: optimize access to SDCl


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH V4 10/12] SD card users: optimize access to SDClass methods
Date: Tue, 31 Jul 2012 13:15:13 -0500
User-agent: Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu)

Igor Mitsyanko <address@hidden> writes:

> On 07/31/2012 07:43 PM, Peter Maydell wrote:
>> On 27 July 2012 20:29, Igor Mitsyanko <address@hidden> wrote:
>>> Rather that repeatedly call SD_GET_CLASS() in a loop, call it once before
>>> a loop starts.
>> Anthony claims that SD_GET_CLASS should be cheap enough that we don't
>> need to hoist it out of loops like this. Do you have profiling data
>> or similar that caused you to write this patch?
>>
>> -- PMM
>>
> Well, I've tested it by measuring an execution time of a 4Kb write to SD 
> card, results showed that arithmetic mean of time for one 4k write was 
> less by ~300us in sequence with SD_GET_CLASS extracted from the loop.

How many loop iterations that?  300us is a huge amount of time, unless
you were looping on every byte, I have a hard time understanding that
delta.

Regards,

Anthony Liguori

> Although I ran this test several times, I have little faith in test 
> methodology and results, it obviously showed significant dispersion 
> between measured time of distinct 4K writes (200-300% if I recall 
> correctly). I really have no objection no objection to dropping this patch.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]