How to detect wasted mem requests from HW prefetcher?

How to detect wasted mem requests from HW prefetcher?

Hello

In our software we have a routine that does some calculation over 520 bytes data blocks. Logic is simple. There is a giant loop, logic selects one block, rather randomly than sequentially, and executes calculation over it, then returns to beginning, selecting next block from the pool. 

There is suspicion that execution is suboptimal. And HW prefetcher abuse memory bandwidth. 520 bytes as block size is big enough to trigger HW prefetching, but it is too short to make it useful and prevent from requesting memory references beyond blocks bounders. 

I would like to verify this hypothesis. For this I need to measure amount of memory requests that were initiated by HW prefetcher, but eventually never demanded by actual code, none of the instruction in calculation uses prfetched values.

Is there a way to do so?

Thanks,

Alexander

publicaciones de 6 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

I only found event HW_PRE_REQ.DL1_MISS, which counts Hardware Prefech requests that miss L1D cache. And that is only workable on SandyBridge processors.

I second this request.  I use a CFD solver that works on unstructured meshes.  All of the array indexing is via index arrays.  I would like Vtune to tell me if disabling the HW prefetcher would be something worth trying.

Dan

>>> All of the array indexing is via index arrays>>>

Do you mean gather operations?

Cita:

dkokron escribió:

I second this request.  I use a CFD solver that works on unstructured meshes.  All of the array indexing is via index arrays.  I would like Vtune to tell me if disabling the HW prefetcher would be something worth trying.

Dan

How do you disable the hardware prefetcher ? I thought this would be impossible, and surely it would completely kill the performance of other processes/threads where the prefetcher is helping ?

Cita:

Richard N. escribió:

How do you disable the hardware prefetcher.

Usually such option is explicitly available in BIOS.

I also doubt that it worth of doing, maybe only in the case where single workload is running on the system for which it helps.

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya