Analyzers
Community support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
4821 Discussions

How to detect wasted mem requests from HW prefetcher?

Alexander_Alexeev
200 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
200 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.

dkokron
Beginner
200 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

Bernard
Black Belt
200 Views

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

Do you mean gather operations?

Richard_Nutman
New Contributor I
200 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 ?

Alexander_Alexeev
200 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.

Reply