gem5: 缓存中如何设置writeback dirty cachelines并invalidate该缓存块
来源:互联网 发布:硬盘修复数据恢复 编辑:程序博客网 时间:2024/05/16 02:14
参考:MemCmd for CleanInvalid
解决方法:
1.使用classic缓存模型, 在src/mem/cache/cache_impl.hh中有两个方法可以实现缓存块的writeback和invalidate.分别为:Cache::writebackVisistor() 和Cache::invalidateVisitor() ,用法如下:
BlkType *blk = tags->accessBlock(addr); writebackVisitor(*blk); invalidateVisitor(*blk);
下文是参考的内容:
Hi Udaya,
The drain() call is used to make sure that there are no transactions pending. The actual writeback and
invalidation is done by memWriteback() and memInvalidate(). The Python world controls draining and
decides what needs to be done. In case of a checkpoint, it will first drain the system (calling drain() and
simulate until all drain() methods return 0, see drain() in src/m5/simulate.py), and then write back
dirty cache lines by calling memWriteback().
In the case of a classic cache, Cache::memWriteback() will call
Cache::writebackVisistor() for each of the blocks in the cache.
Similarly, there is a Cache::invalidateVisitor() that invalidates cache lines.
You will should be able to use the invalidateVisitor right away to invalidate cache lines without writing
them to memory. You could use the writeback visitor to write blocks to memory. It will be functionally
correct, however you won’t get any timing information since it is completely functional (and updates
/all/ copies of the block everywhere in the system). You probably need to implement something similar to
writebackVisitor() that sends an atomic or timing request (the request type depends on the current memory
mode) to the next level in the memory hierarchy.
- gem5: 缓存中如何设置writeback dirty cachelines并invalidate该缓存块
- gem5: 在缓存代码中如何识别缓存是L1,L2还是L3呢?
- gem5中查看缓存信息cache_impl.hh
- gem5中查看缓存配置后的体系结构pydot
- 如何设置IIS缓存
- 如何设置IIS缓存
- apache如何设置缓存
- apache如何设置缓存
- apache如何设置缓存
- 块缓存
- 块缓存
- tomcat中设置缓存
- java中的缓存技术该如何实现
- java中的缓存技术该如何实现
- java中的缓存技术该如何实现
- java中的缓存技术该如何实现
- java中的缓存技术该如何实现
- java中的缓存技术该如何实现
- RecylerView通用分隔线实现
- 【Java基础】——JDBC
- 每天学点Python之数值类型
- 提取pdf文件文本:pdfparser与xpdf具体操作
- java 效率编程(创建对象)
- gem5: 缓存中如何设置writeback dirty cachelines并invalidate该缓存块
- TopCoder SRM676 Div. 2 Problem 550 - BoardEscapeDiv2
- PHP 构建通信服务器
- 减少VoIP时延的方法
- 关于多表关联update的问题
- 觉真长老:自心一变,境界大开。
- 【J】Android-Widget桌面小组件
- Matlab和C++混合编程——在matlab调试过程中可以跳入VS调试观察.cpp文件中的数据
- 怎样配置Ruckus AP