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

6 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Peter Wang (Intel)

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

Ritratto di iliyapolak

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

Do you mean gather operations?

Citazione:

dkokron ha scritto:

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 ?

Citazione:

Richard N. ha scritto:

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.

Accedere per lasciare un commento.