什么是&QUOT意义;非颞"内存访问在86 [英] What is the meaning of "non temporal" memory accesses in x86

查看:161
本文介绍了什么是&QUOT意义;非颞"内存访问在86的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个有些低级别的问题。在x86汇编有两个SSE指令:

This is a somewhat low-level question. In x86 assembly there are two SSE instructions:

MOVDQA XMMI,M128

MOVNTDQA XMMI,M128

在IA-32软件开发人员手册说,的 NT 的在MOVNTDQA代表的非临时的,并且,否则它一样MOVDQA。

The IA-32 Software Developer's Manual says that the NT in MOVNTDQA stands for Non-Temporal, and that otherwise it's the same as MOVDQA.

我的问题是,是什么的非临时的意思吗?

My question is, what does Non-Temporal mean?

推荐答案

非临时SSE指令(MOVNTI,MOVNTQ等),不按正常的高速缓存一致性规则。因此,非临时存储必须跟随为了一个SFENCE指令的结果通过其它处理器及时看到。

Non-Temporal SSE instructions (MOVNTI, MOVNTQ, etc.), don't follow the normal cache-coherency rules. Therefore non-temporal stores must be followed by an SFENCE instruction in order for their results to be seen by other processors in a timely fashion.

在数据产生,而不是(立即)再次食用,但事实上,内存存储操作读取整个缓存线,然后再修改缓存的数据会降低性能。此操作将数据推出的可能再次需要有利于数据的,这将不会很快使用的高速缓存。这对大的数据结构,如矩阵,其被填充,再后来使用尤其如此。矩阵的最后一个元素填补之前的庞大规模驱逐的第一要素,使得写入缓存无效的。

When data is produced and not (immediately) consumed again, the fact that memory store operations read a full cache line first and then modify the cached data is detrimental to performance. This operation pushes data out of the caches which might be needed again in favor of data which will not be used soon. This is especially true for large data structures, like matrices, which are filled and then used later. Before the last element of the matrix is filled the sheer size evicts the first elements, making caching of the writes ineffective.

有关这一点,类似的情况下,处理器提供非临时写操作的支持。非暂时在此上下文中意味着数据不会很快重用,因此没有理由缓存它。这些非临时写操作不读缓存行,然后修改它;相反,新​​的内容直接写入存储器。

For this and similar situations, processors provide support for non-temporal write operations. Non-temporal in this context means the data will not be reused soon, so there is no reason to cache it. These non-temporal write operations do not read a cache line and then modify it; instead, the new content is directly written to memory.

来源: http://lwn.net/Articles/255364/

这篇关于什么是&QUOT意义;非颞"内存访问在86的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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