Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
26 Views

How to manipulate the prefetcher on Core 2?

Hi, all!

I would like to do some experiment, and want to manually enable or disable the prefetcher of the cache. The system I am using is Linux 2.6.20 and the processor is Intel Core 2.

Would you give some suggestion to implement this function or tell me some literatures i shall refer to?

Thanks a lot!
0 Kudos
2 Replies
Highlighted
Employee
26 Views

Quoting - zhangyihere
Hi, all!

I would like to do some experiment, and want to manually enable or disable the prefetcher of the cache. The system I am using is Linux 2.6.20 and the processor is Intel Core 2.

Would you give some suggestion to implement this function or tell me some literatures i shall refer to?

Thanks a lot!

I think that the purpose of "Prefetching"is to access address early whenuser's application is busy on computing work - (especially if the data is not in cache, it will be very expensive to load it from main memory when using it).

I saw that Intel C++ compiler professional Edit includes "_MM_INLINE_COMMAND static void __cdecl _mm_prefetch(char const *a, int sel)" in xmm_func.h - you can go to http://software.intel.com/en-us/forums/intel-c-compiler/ to create a new thread to discuss its usage.

Regards, Peter
0 Kudos
Highlighted
Black Belt
26 Views

Quoting - zhangyihere
I would like to do some experiment, and want to manually enable or disable the prefetcher of the cache. The system I am using is Linux 2.6.20 and the processor is Intel Core 2.

Would you give some suggestion to implement this function or tell me some literatures i shall refer to?

If you wish to turn off hardware strided prefetch or adjacent sector prefetch, and you have no option for that in your BIOS setup screens, it can be done in your program by MSR setting, with root privilege. The setting is system wide. This is commonly done for database applications.
A non-temporal store to a cache line will evict it from cache, regardless of MSR setting. It's not a useful alternative where prefetch disabling would be used to improve performance.
0 Kudos