Re: [hatari-devel] Adding cache support for the MegaSTE

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Nicolas Pomarède schrieb:

from the result it means that we have cache hit when reading
(total=$df). This is slower than 3rd test ($a7) but that's because we
have 16384 writes instead of 8192 writes.

One problem with interpreting these numbers is that you have to consider that your code is also uncached or cached, depending on the machine config. Hence, if you do, e.g., ...

loop:
MOVE.W (A0)+,D0
DBF D1,loop

... you'll have some memory accesses for code (that are cached for sure when the cache is on) and just one memory access for data, which is what you are actually testing for.

To distinguish between these situations, I suggest that you enhance your program: In one test, you invalidate the cache and read memory that you didn't write before. This will give you the number when you have cache hits for code and cache misses for data. In a second test, you invalidate the cache, write data and read it back. This will give you the results with cache hits for code *and* data.

(Actually, because of the cache topology, even in the second test your code will replace a few words of data in the cache, causing some misses.)

Regards
Christian
--
Christian Zietz  -  CHZ-Soft  -  czietz@xxxxxxx
WWW: https://www.chzsoft.de/
New GnuPG-Key-ID: 0x8708B34C827B159E



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/