什么是“存储缓冲区转发"?英特尔开发人员手册中的意思是什么? [英] What does "store-buffer forwarding" mean in the Intel developer's manual?

查看:80
本文介绍了什么是“存储缓冲区转发"?英特尔开发人员手册中的意思是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

The Intel 64 and IA-32 Architectures Software Developer's Manual says the following about re-ordering of actions by a single processor (Section 8.2.2, "Memory Ordering in P6 and More Recent Processor Families"):

读取可能会随着对不同位置的较旧写入而重新排序,但是 不能将较旧的内容写入同一位置.

Reads may be reordered with older writes to different locations but not with older writes to the same location.

然后在下面的讨论中,与以前相比,在此方面放宽了一些 处理器,它说:

Then below when discussing points where this is relaxed compared to earlier processors, it says:

存储缓冲区转发,当读取将写入传递到同一内存时 位置.

Store-buffer forwarding, when a read passes a write to the same memory location.

据我所知,存储缓冲区转发"没有精确定义 任何地方(都不是通过").读通过写是什么意思 到这里相同的位置,因为上面说读不能 重新写入到同一位置而重新排序?

As far as I can tell, "store-buffer forwarding" isn't precisely defined anywhere (and neither is "pass"). What does it mean for a read to pass a write to the same location here, given that above it says that reads can't be reordered with writes to the same location?

推荐答案

命名有点尴尬. 转发"发生在内核/逻辑处理器内部,如下所示.如果首先执行存储,它将进入存储缓冲区以异步方式刷新到内存.如果在将值刷新到高速缓存/内存之前在同一处理器上的同一位置进行后续的LOAD,则来自存储缓冲区的值将被转发",并且您将获得刚刚存储的值.读操作传递"了写操作,因为它发生在从存储缓冲区到内存的实际写操作之前(尚未发生).

The naming is a bit awkward. The "forwarding" happens inside a core/logical processor, as follows. If you first do a STORE, it will go to the store buffer to be flushed to memory asynchronously. If you do a subsequent LOAD to the same location ON THE SAME PROCESSOR before the value is flushed to the cache/memory, the value from the store buffer will be "forwarded" and you will get the value that was just stored. The read is "passing" the write in that it happens before the actual write from store-buffer to memory (which has yet to happen).

如果您只关心排序规则,该语句实际上并没有说太多-这种转发详细说明了它们在内部所做的操作,以确保(在处理器上)读取不会与对同一位置的较旧写入进行重新排序((您引用的规则的一部分).

The statement isn't saying much actually if you just care about the ordering rules - this forwarding is a detail of what they do internally to guarantee that (on a processor) reads are not reordered with older writes to the same location (part of the rule you quoted).

尽管这里给出了其他一些答案,但是(至少就订购保证而言)在处理器/内核之间没有存储缓冲区转发/监听,如8.2.3.5允许处理器内转发"手册显示的示例.

Despite what some of the other answers here state, there is (at least as far as ordering guarantees go) NO store-buffer forwarding/snooping between processors/cores, as the 8.2.3.5 "Intra-Processor Forwarding Is Allowed" example in the manual shows.

这篇关于什么是“存储缓冲区转发"?英特尔开发人员手册中的意思是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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