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

2012-07-27 Thread Igor Mitsyanko
Rather that repeatedly call SD_GET_CLASS() in a loop, call it once before a loop starts. Signed-off-by: Igor Mitsyanko --- hw/omap_mmc.c|9 + hw/pl181.c |7 --- hw/pxa2xx_mmci.c |6 -- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/hw/omap_m

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

2012-07-31 Thread Peter Maydell
On 27 July 2012 20:29, Igor Mitsyanko 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 cause

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

2012-07-31 Thread Igor Mitsyanko
On 07/31/2012 07:43 PM, Peter Maydell wrote: On 27 July 2012 20:29, Igor Mitsyanko 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 y

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

2012-07-31 Thread Peter Maydell
On 31 July 2012 18:33, Igor Mitsyanko wrote: > On 07/31/2012 07:43 PM, Peter Maydell wrote: >> 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? > Well, I'

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

2012-07-31 Thread Igor Mitsyanko
On 07/31/2012 09:47 PM, Peter Maydell wrote: On 31 July 2012 18:33, Igor Mitsyanko wrote: On 07/31/2012 07:43 PM, Peter Maydell wrote: 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 cause

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

2012-07-31 Thread Anthony Liguori
Igor Mitsyanko writes: > On 07/31/2012 07:43 PM, Peter Maydell wrote: >> On 27 July 2012 20:29, Igor Mitsyanko 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

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

2012-07-31 Thread Igor Mitsyanko
On 07/31/2012 10:15 PM, Anthony Liguori wrote: 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. I'm not sure I understand what you mean, I did loop on every byte, that's how our SD model works. S