Switching CPU Prefetching
Principles
Locality principles include temporal locality and spatial locality.
- Temporal locality: If a data item is accessed, it may be accessed again soon.
- Spatial locality: If a data item is accessed, the data item adjacent to it in address may also be accessed soon.
When the CPU reads data from the memory to the cache of the CPU, the CPU reads the data to be accessed this time and prefetches the peripheral data of the data to the cache. If the prefetched data is the data to be accessed next time, the performance is improved, if the prefetched data is not the data to be accessed next time, the memory bandwidth is wasted.
In scenarios where data is centralized, the prefetch hit ratio is high. In this case, you are advised to enable CPU prefetching. Otherwise, disable CPU prefetching. Currently, CPU prefetching is suitable for SPEC CPU and x265 software scenarios. CPU prefetching needs to be disabled for stream test tools, Nginx, and databases.
Modification Method
Access the

