[Pixman] [PATCH] ARM: NEON: use prefetch in bilinear scaled 'src_8888_8888'

Siarhei Siamashka siarhei.siamashka at gmail.com
Sat Mar 5 03:18:33 PST 2011


On Sat, Mar 5, 2011 at 12:53 AM, Siarhei Siamashka
<siarhei.siamashka at gmail.com> wrote:
> From: Siarhei Siamashka <siarhei.siamashka at nokia.com>
>
> Software prefetch significantly improves bilinear scaling performance
> and pushes it up to memory bandwidth limit.
>
> Benchmark on ARM Cortex-A8:
>  Microbenchmark (scaling 2000x2000 image with scale factor close to 1x):
>  before: op=1, src=20028888, dst=20028888, speed=44.27 MPix/s
>  after:  op=1, src=20028888, dst=20028888, speed=68.21 MPix/s
>
>  performance of nearest scaling for comparison:
>          op=1, src=20028888, dst=20028888, speed=74.70 MPix/s

While the patch itself should be fine, I was mistaken regarding the
statement about bilinear scaling now only becoming limited by "memory
bandwidth". Apparently it's more like some memory controller issue on
the device which I initially used for testing, which was levelling
bilinear and nearest scaling performance, and also made prefetch
useless for nearest scaling. Trying the same benchmark with another
gadget also having Cortex-A8 1GHz processor but using different SoC, I
get about the same bilinear performance, but much faster nearest
scaling. And moreover, nearest scaling actually also benefits from
prefetch on it, pushing performance even further. Seems like some
parts of pixman ARM/NEON optimizations may need to be revised to take
advantage of decent memory controllers and better memory bandwidth.

In any case, the commit message should just state plain facts about
bilinear performance increase and avoid comparing it with nearest
scaling performance yet.

-- 
Best regards,
Siarhei Siamashka


More information about the Pixman mailing list