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 i.mitsya...@samsung.com 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

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 i.mitsya...@samsung.com 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

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 i.mitsya...@samsung.com 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

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 i.mitsya...@samsung.com 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

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

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

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.

[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 i.mitsya...@samsung.com --- hw/omap_mmc.c|9 + hw/pl181.c |7 --- hw/pxa2xx_mmci.c |6 -- 3 files changed, 13 insertions(+), 9 deletions(-)