Improve L1 and L2 benchmark tests for caches that don't use allocate-on-write
authorBen Avison <bavison@riscosopen.org>
Thu, 24 Jan 2013 18:19:48 +0000 (18:19 +0000)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Tue, 29 Jan 2013 20:23:05 +0000 (15:23 -0500)
commit69a7a9b6b6dc5b769888c469de3435059318f7cc
tree05329aa8f4c366e58807a2a6e5d10c014789378e
parent1fa67f499d3826fad8783684bb90c8aadd9f682f
Improve L1 and L2 benchmark tests for caches that don't use allocate-on-write

In particular this affects single-core ARMs (e.g. ARM11, Cortex-A8), which
are usually configured this way. For other CPUs, this should only add a
constant time, which will be cancelled out by the EXCLUDE_OVERHEAD runs.

The problems were caused by cachelines becoming permanently evicted from
the cache, because the code that was intended to pull them back in again on
each iteration assumed too long a cache line (for the L1 test) or failed to
read memory beyond the first pixel row (for the L2 test). Also, the reloading
of the source buffer was unnecessary.

These issues were identified by Siarhei in this post:
http://lists.freedesktop.org/archives/pixman/2013-January/002543.html
test/lowlevel-blt-bench.c