英特尔CPU缓存策略 [英] Intel CPU Cache Policy

查看:177
本文介绍了英特尔CPU缓存策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台笔记本电脑,配备了Intel(R)Core(TM)i5-2450M CPU @ 2.50GHz处理器. 我在Ubuntu 12.04(x86_64)上,试图查找有关我的处理器的信息.

I have a laptop with an Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz processor. I'm on Ubuntu 12.04 (x86_64) and I'm trying to find some info about my processor.

我能够找到我一直在寻找的大多数信息

I was able to find most of the information I was looking for using

cat /proc/cpuinfo

lscpu

我还要找出每个高速缓存级别上使用的高速缓存策略.是回写还是通过写?

What I want to also find out is the cache policy that is used on each cache level. Is it write back or write through?

我可以使用任何工具来查找此类信息吗?

Is there any tool that I can use to find out such info?

谢谢.

推荐答案

这不是您可以从CPUID等中查询的内容,也无法将CPU配置为可以执行一个或另一个操作,因此不存在用于查询的工具. 可以查询的是缓存关联性,缓存行大小和缓存大小,例如通过/proc/cpuinfo.

This is not something you can query from CPUID or such, nor can you configure your CPU to do one or the other, thus there exists no tool for querying. What you can query is the cache associativity, the cache line size, and the cache size, for example via /proc/cpuinfo.

在过去的一,二十年中,所有与Intel兼容的CPU都对缓存使用了回写策略(假定首先获取一条缓存行以允许部分写入).当然,这就是理论,现实要复杂得多.

All Intel-compatible CPUs during the last one/two decades used a write-back strategy for caches (which presumes fetching a cache line first to allow partial writes). Of course that's the theory, reality is slighly more complex than that.

几乎所有处理器(包括您的型号)都具有一种或几种形式的写合并(或自Merom以来称为Intel所称的填充缓冲区),除最旧的Intel兼容CPU外,所有CPU均支持来自SSE寄存器的未缓存写操作(这又一次)使用写合并形式).然后当然还有诸如片上缓存一致性协议和探听过滤之类的东西以及其他机制,以确保一个处理器的内核之间以及多处理器系统中不同处理器之间的缓存一致性. 尽管如此,一般的缓存策略仍然是回写.

Virtually all processors (your model included) have one or several forms of write combining (or fill buffers as Intel calls it since Merom), and all but the most antique Intel-compatible CPUs support uncached writes from SSE registers (which again uses a form of write-combining). And then of course, there are things like on-chip cache coherence protocols and snoop filtering and other mechanisms to ensure cache coherency both between cores of one processor and between different processors in a multi-processor system.
Nevertheless -- the general cache policy is still write-back.

这篇关于英特尔CPU缓存策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆