首页 > 其他分享 >指令cache一致性

指令cache一致性

时间:2023-12-04 16:25:13浏览次数:22  
标签:instruction cache 指令 L2 L1i coherency 一致性 data

指令cache一致性

image

N2 also gets optional hardware instruction cache coherency. ARM recommends enabling it on systems with a lot of cores because broadcasting software-issued instruction cache invalidates would not be scalable. To implement instruction cache coherency, ARM makes the L2 cache inclusive of L1i contents. Then, I assume the L2 becomes exclusive of L1 data cache contents, ensuring that data writes will never cause a L1d hit when the address is in L1i. Finally, a read-for-ownership will evict a line from L2 caches in all other cores, which automatically causes L1i invalidates and prevents L1i caches from holding stale data.

ARM recommends configuring the core with 1 MB of L2. A 512 KB L2 would spend 1/8 of its capacity duplicating L1i contents to ensure L1i coherency, and a 256 KB L2 would be a really bad idea (likely why ARM doesn’t even allow it as an option). Thankfully, going to 1 MB of L2 capacity doesn’t cost any extra latency. Just as with A710’s 512 KB L2, getting data from L2 takes 13-14 cycles. Ampere Altra and Zen 4 have similar cycle counts for L2 accesses, though Zen 4 enjoys an actual latency advantage thanks to higher clock speeds.

Strangely, code fetch bandwidth from L2 is worse than from L3. I wonder if Loongson ran into some difficulties when implementing hardware instruction cache coherency. If done correctly, hardware instruction cache coherency can benefit JIT-ed code and enable better scaling to high core counts. However, it’s not easy. Loongson’s L2 is non-inclusive, which means it can’t act as a snoop filter. Maybe a L2 hit from the instruction side has to probe the L1D to ensure it gets up-to-date data. But a L3 hit might benefit from separate coherency directory located in the L3 complex, which can indicate whether up-to-date data can be provided without snoops.

标签:instruction,cache,指令,L2,L1i,coherency,一致性,data
From: https://www.cnblogs.com/readdad/p/instruction-cache-consistency-nsubv.html

相关文章

  • Redis缓存和MySQL数据一致性方案详解
    需求起因在高并发的业务场景下,数据库大多数情况都是用户并发访问最薄弱的环节。所以,就需要使用redis做一个缓冲操作,让请求先访问到redis,而不是直接访问MySQL等数据库读取缓存步骤一般没有什么问题,但是一旦涉及到数据更新:数据库和缓存更新,就容易出现缓存(Redis)和数据库(MYSQL)间......
  • Vue 常用的指令都有哪些?
    1、v-model多用于表单元素实现双向数据绑定(同angular中的ng-model)2、v-for格式:v-for="字段名in(of)数组json"循环数组或json(同angular中的ng-repeat),需要注意从vue2开始取消了$index3、v-show显示内容(同angular中的ng-show)4、v-hide隐藏内容(同angular......
  • 图形渲染ISA指令集分析
    图形渲染ISA指令集分析1ISA定义就像任何语言都有有限的单词一样,处理器可以支持的基本指令/基本命令的数量也必须是有限的,这组指令通常称为指令集(instructionset),基本指令的一些示例是加法、减法、乘法、逻辑或和逻辑非。请注意,每条指令需要处理一组变量和常量,最后将结果保存在......
  • (自用)基于unity的指令(命令)模式
    指令模式1.配置输入 所有游戏中都包含玩家输入指令的部分(这些部分通常写在游戏循环中如unity中的UpData())游戏会每一帧都进行一次读取,当玩家按下相应按键时则会进行对应方法 为了可以时刻检测并记录玩家进行的操作,或者对某个对应的操作的指令进行更改,我们需要将这些......
  • openGauss学习笔记-138 openGauss 数据库运维-例行维护-检查时间一致性
    openGauss学习笔记-138openGauss数据库运维-例行维护-检查时间一致性数据库事务一致性通过逻辑时钟保证,与操作系统时间无关,但是系统时间不一致会导致诸多潜在问题,主要是后台运维和监控功能异常,因此在月度检查时建议检查各个节点的时间一致性。138.1操作步骤以操作系统用户o......
  • ElasticSearch之Clear cache API
    本方法用于清理缓存。命令样例如下:curl-XPOST"https://localhost:9200/testindex_001/_cache/clear?pretty"--cacert$ES_HOME/config/certs/http_ca.crt-u"elastic:ohCxPH=QBE+s5=*lo7F9"执行结果的样例,如下:{"_shards":{"total":2,......
  • dubbo中接口cache使用及原理
    服务提供者类增加注解@DubboService(cache="true")指定服务调用的缓存实现,包括:lru,threadlocal,jcache。 提供者@DubboService(token="true",cache="true")publicclassCacheServiceImplimplementsCacheService{privatefinalAtomicIntegeri=......
  • Caffeine Cache缓存
    SpringBoot集成CaffeineCaffeine和SpringCache依赖,使用注解方法实现缓存依赖<!--提供SpringBoot中的缓存支持--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-cache</......
  • jenkins使用shell提交git指令时,怎么使用 credential凭证信息
    在Jenkins中使用shell脚本提交Git指令时,你可以通过使用Git凭据信息来进行认证。这可以通过以下步骤来实现:设置Git凭据:在Jenkins中,你可以在“凭据”(Credentials)中添加Git的用户名和密码。在Jenkins主界面,点击“凭据”->“系统”->“全局凭据”->“添加凭据”,然......
  • 主存Cache存储
    总结1.Cache是按块进行管理的。Cache和主存均被分割成大小相同的块。信息以块为单位调入Cache。一般将主存分割成大小相同的块后,会再将块进行分组,以Cache的总行数为一组,再分成n个块群。2.主存地址格式中的区内块号是用于查找该块在Cache中的位置,即第几行。块内位移用于确定所访......