Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4975 Discussions

How to detect wasted mem requests from HW prefetcher?

Alexander_Alexeev
299 Views

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

0 Kudos
5 Replies
Peter_W_Intel
Employee
299 Views

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.

0 Kudos
dkokron
Beginner
299 Views

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

0 Kudos
Bernard
Valued Contributor I
299 Views

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

Do you mean gather operations?

0 Kudos
Richard_Nutman
New Contributor I
299 Views

dkokron wrote:

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 ?

0 Kudos
Alexander_Alexeev
299 Views

Richard N. wrote:

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.

0 Kudos
Reply