Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【question】StoreStore屏障的实现 #12

Open
JuncusEffusus opened this issue Aug 25, 2020 · 0 comments
Open

【question】StoreStore屏障的实现 #12

JuncusEffusus opened this issue Aug 25, 2020 · 0 comments

Comments

@JuncusEffusus
Copy link

书籍P394,第三自然段:
StoreStore 屏障可以通过对写缓冲器中的条目进行标记来实现禁止 StoreStore 重排序。
StoreStore 屏障会将写缓冲器中的现有条目做一个标记,以表示这些条目代表的写操作需要先于该屏障之后的写操作被提交。
处理器在执行写操作的时候如果发现写缓冲器中存在被标记的条目,那么即使这个写操作对应的高速缓存条目的状态为E或者M,此时处理器也不直接将写操作的数据写入高速缓存,而是将其写入写缓冲器,从而使得 StoreStore 屏障之前的任何写操作先于该屏障之后的写操作被提交。

请问:
最后一句话,“不直接将写操作的数据写入高速缓存,而是将其写入写缓冲器”是否写错了?既然是左侧store先提交,也就是内存操作作用到主内存(或者高速缓存),那么应该不是写入写缓冲器,而是写入高速缓存吧?这块概念理解有点困难,还盼作者回复,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant