使CPU的缓存无效 [英] Invalidating the CPU's cache

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

问题描述

当我的程序执行带有获取语义的加载操作/使用释放语义或可能是完整功能的存储操作时,它会使CPU的缓存无效。

我的问题是:缓存的哪一部分是真的无效了吗?只有保存我使用过的变量的缓存行才能获取/释放?还是整个缓存无效? (L1 + L2 + L3 ..依此类推?)。当我使用获取/释放语义或使用完整围栏时,在这个主题上有什么区别吗?

When my program performs a load operation with acquire semantics/store operation with release semantics or perhaps a full-fence, it invalidates the CPU's cache.
My question is this: which part of the cache is actually invalidated? only the cache-line that held the variable that I've used acquire/release? or perhaps the entire cache is invalidated? (L1 + L2 + L3 .. and so on?). Is there a difference in this subject when I use acquire/release semantics, or when i use a full-fence?

推荐答案

I 我不是这方面的专家,但我偶然发现了这份文档,也许对您很有帮助
http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2009.04.05a.pdf

I'm not an expert on this, but I stumbled on this document, maybe it's helpful http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2009.04.05a.pdf

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

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