CHI dataless 传输——CHI(4)

上篇介绍了read的操作类型,本篇我们来介绍一下dataless

目录

一、dataless操作概览

二、Non-CMO (Non-Cache Maintenance Operation)

1、CleanUnique

2、StashOnce and StashOnceSep

3、Evict

三、CMO (Cache Maintenance Operation)


一、dataless操作概览

名称(non-CMO)

描述

CleanUnique

snoopable地址区域的请求,将Requestercache line状态更改为“Unique”,以便对该cache line执行写操作。对其他的mastercache clean,并且invalid,其他cache line dirty的数据需要写入main memory

MakeUnique

CleanUnique,但是dirty cacheline直接丢弃。

Evict

用于告诉ICN,该RN-F不再缓存这个cacheline(类似于CPU知会HNF某一条cacheline已经被逐出了,本地已经没有了)

StashOnceUnique, StashOnceSepUnique

snoopable地址区域的请求,以尝试将被寻址的cacheline移动到目标缓存,以使目标能够存储该行。被寻址的RN可以按照ReadUnique来处理

StashOnceShared, StashOnceSepShared.

同上,被寻址的RN可以按照ReadNotSharedDirty 来处理

名称 (CMO)

描述

CleanShared

snoopable地址区域的请求,有缓存副本都更改为非dirty状态,并且任何dirty副本都会写回main memory

CleanSharedPersist

同上,但是dirty数据写入PoP(Point of Persistence ). PoP是内存系统中的一个点,当系统电源断开时,会保持对内存的写入,当电源恢复时,会可靠的恢复对内存的写入

CleanSharedPersistSep

同上,但是对requester需要有2responseComp response 表示请求到达HNPersist response表示请求已到达PoP

CleanInvalid

requesterI态时才能发此请求, 将拥有此 cacheline 副本invalidatedirty的写回main memory

MakeInvalid

同上,dirty的丢弃

CleanSharedPersistSep 的功能与leanSharedPersist 类似,但需要对请求者进行两个单独的响应:

1、Comp 响应,表明请求已达到一致性点(PoC),并且可以在请求者处消除危险。

2、持久响应,表明请求已到达PoP 或最终目的地。

PoC (Point of Coherence) : A point at which all agents that can access memory are guaranteed to see the same copy of a memory location. In a typical CHI based system it is the HN-F in the interconnect.

保证所有可以访问内存的代理都能看到内存位置的相同副本的点。 在典型的基于 CHI 的系统中,它是互连中的 HN-F

Dataless transaction可分为Non-CMO (Non-Cache Maintenance Operation) CMO (Cache Maintenance Operation)

第一个表为non-CMO的操作,第二个表为CMO操作

二、Non-CMO (Non-Cache Maintenance Operation)

支持的操作有:

CleanUnique

MakeUnique

• Evict.

StashOnceUnique, StashOnceSepUnique.

StashOnceShared, StashOnceSepShared.

步骤如下:

1、The Requester sends a Snoopable Read request on the REQ channel 

2、The Completer returns the read data and any associated transaction response with the CompData opcode on the RDAT channel

3、Requester must return an acknowledgement, using the CompAck opcode on the SRSP channel to indicate that the transaction has completed. 

non-CMO的操作本文会举3个例子:CleanUnique、StashOnceShared、Evict

1、CleanUnique

CleanUnique : CleanUnique是将其他的mastercache clean,并且invalid,只保留当前mastercache(此cache可以是clean,也可以是dirty); 其他cache line dirty数据需要写入main memory

1、RN-F1 has the cache line in SD state and responds to the snoop with a snoop response with data and PD asserted.

2、HN-F waits for all snoop responses and then sends a Comp_UC response to the Requester.

3、HN-F sends a Write request to update memory with the data received from RN-F1.

SnpRespData_I_PD后缀为PD,PD ( pass dirty ) 表示更新内存的责任已传递给请求者或 ICN。只能为带有数据的 Snoop 响应声明 Pass Dirty

Comp_UC : CleanUnique MakeUniquecomp response

MakeUnique相比cleanunique,没有写入main memory的操作,且不管其他cacheline的状态,dirtys数据会丢弃

2、StashOnce and StashOnceSep

Cache stashing机制可将数据存在系统中特定cache中,确保data靠近使用的节点,因此可以提高系统性能。Cache stashing只支持Snoopable memory空间。

相关的操作有:

StashOnceUnique,

• StashOnceSepUnique.

StashOnceShared,

• StashOnceSepShared.

步骤如下:

1、RN在REQ channnel发送request

2、ICN返回 comp response

3、如果是StashOnceSep requestHome返回StashDone响应,表示request已经被保序

4、Home还可以选择是否在SNP channelsnoop 目标RN-F

5、目标RN-F发送SnpResp响应,可以选择是否包含DataPull DataPull =0b001表示响应包含读请求

6、如果DataPull =0b001,则Home发送CompData响应

7、目标RN-F收到CompData后,返回CompAck

Datapull[2:0]==0b001 : Inclusion of Data Pull in the Snoop response(Snoop 响应中包含数据拉取)

Data Pull. Indicates the inclusion of an implied Read request in the Data response. (数据拉取。 指示在数据响应中包含隐含的读取请求)

DataPull只能等于0b0000b001

Comp : Completer接受已经请求,并且不会发送RetryAck相应

StashDone : 后续对于同一内存位置的transaction,该transaction是可被观察到的(保序)

StashOnce的四种操作的区别在于:

• Sends StashOnce∗Unique to Home if the stashed cache line is to be modified.

如果要修改stash的缓存行,则将 StashOnce*Unique 发送到 Home

• Sends StashOnce∗Shared to Home if the stashed cache line is not to be modified.

如果不修改stash的缓存行,则将StashOnce*Shared 发送到Home

• Sends StashOnceSep only if the Requester is capable of handling the StashDone response.

仅当请求者能够处理StashDone 响应时才发送StashOnceSep

• The StashOnce∗ requests provide a Stash target when the data is to be stashed in a peer cache.

当数据要存储在对等缓存中时,StashOnce* 请求提供存储目标。

• The StashOnce∗ requests do not provide a Stash target when the data is to be allocated to the next level cache.

当数据要分配到下一级缓存时,StashOnce* 请求不提供Stash 目标。

StashOnceShared为例

1、RN sends a StashOnceShared request to HN-F with the Stash target identified as RN-F1.

2、HN-F sends a Comp response after establishing processing order for the received request that is guaranteeing the request is processed before a request to the same address 

此响应是为了保序(该处理request要优先于后续任何request对该地址的请求)

3、HN-F sends a SnpStashShared snoop to RN-F1, and a ReadNoSnp request to SN-F to fetch Data.

4、RN-F1 sends SnpResp_I_Read response to HN-F.

5、HN-F treats the Read request from RN-F1 as a ReadNotSharedDirty, and sends a combined CompData to RN-F1.

6、 RN-F1 sends CompAck to HN-F to complete the Read transaction.

该操作的目的是,将SN中指定地址的数据,搬到RN-F1。但是在搬运前,要先对RN-F1进行snoop,判断RN-F1是否已经具有该数据

Snpresp_i_Read, 表示当前stateinvalid的,同时带有read操作,要pull data;

SnpStashShared
Snoop request recommending that the Snoopee obtains a copy of the cache line in a Shared state:
• Permitted to be sent to only one RN-F. 只能发送给RN-F
• This specification recommends not sending the snoop if the cache line is cached at the target. 如果
cache line就在target中,则建议不发送snoop
• The Snoopee must not return data with the Snoop response. 该
snoop不能返回数据
• Permits the Snoop response to include a Data Pull. 该
snoopresponse允许包含Data Pull
• Must not change the cache line state at the Snoopee. 不能改变被
snoopcache line状态

The responses that include Data Pull are:
SnpResp_I_Read.
SnpRespData_I_Read.
SnpRespData_I_PD_Read.
SnpRespDataPtl_I_PD_Read.

3、Evict

告诉HN, 当前RN中的这条cacheline不再进行缓存;类似于CPU知会HNF某一条cacheline已经被逐出了,本地已经没有了;

RN在发送请求之前,会先将状态调整到 I

Evict

        --告诉HN, 当前RN中的这条cacheline不再进行缓存;

        --类似于CPU知会HNF某一条cacheline已经被逐出了,本地已经没有了;

        --RN在发送之前,会先将状态调整到I;

三、CMO (Cache Maintenance Operation)

支持的操作有:

CleanShared

CleanSharedPersist

CleanSharedPersistSep

CleanInvalid.  • MakeInvalid.

步骤如下:

1、The Requester sends a request on the REQ channel

2、The Completer returns a Comp response on the CRSP channel.

3、For the CleanSharedPersistSep transaction the Completer also returns a Persist response to the Requester. The Completer is permitted to combine the Comp and Persist responses into a single CompPersist response.

CleanSharedPersistSep为例:

要求所有CPUdirty数据都写回主存

In this example of CleanSharedPersistSep transaction flow, the Point of Persistence (PoP) is at the SN-F.

1、RN-F1 has the cache line in SC state. RN-F1 responds to the snoop with a snoop response without data.

2、HN-F waits for all snoop responses and then sends a Comp_SC response to the Requester.

3、HN-F sends a CleanSharedPersistSep request to SN-F, only after completing the writing back of all snooped Dirty data, if any, to the SN-F. SN-F responds to the request with Comp

4、SNF sends a Persist response to RN-F0 to indicate that the request has reached the PoP, and data from any prior writes to the same location is pushed to the PoP 

PoP (Point of Persistence) : 系统中用于持久性存储的特定位置或机制。它表示数据在系统中的存储状态,以确保数据在断电或重启后仍然可用。通常是将易失性存储(如cache)复制到非易失性存储(如硬盘

图中,Comp_UC反映了其他master中该cache line的状态

Comp_UC

        1、表明该cache line副本在Requester中至高可以为UC状态(即可以是UCUCESCI)。

        2、不过MakeReadUnique/CleanUnique这两个“Upgrade”的请求则有所差异,SD收到Comp_UC后进入UD状态。这在下文关于MakeReadUnique的描述中可以再次看到。

相应的response还有:

Comp_I

        表明该cache line副本在Requester中最终需为I状态。

Comp_SC

        表明该cache line副本在Requester中至高可以为SC状态(即可以是SCI)。

Comp_UD_PD

        表明将更新Memory的责任传递给Requester,该cache line副本在Requester中至高可以为UD状态(即可以是UDSD)。

对于CleanShared,可能会收到Comp_UCComp_SCComp_ICleanShared用于将其他副本的dirty数据写回,并不会无效化其他副本,所以收到response后缓存行状态不改变。

对于CleanUnique,只会收到Comp_UC。收到时处于I状态(出现I状态的原因是发出CleanUnique后被invalid),则进入UCE;收到时处于SC状态,则进入UC状态;收到时处于SD,则进入UD状态。

对于MakeUnique,只会收到Comp_UC。由于其写一整行,所以最终进入UD状态。

  • 25
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据提供的引用,关于CHI Stash的信息如下: CHI Stash是用于解决组件系统中的Cache一致性问题的一种方案。在组件系统搭建起来后,会遇到Cache一致性的问题。为了解决这个问题,可以使用CHI Stash来保持Cache的一致性。CHI Stash是基于解决Cache一致性方案的基本读写操作之一。 在测试场景中,CHI Stash会对数据进行存储和转发。当RNI进行stash操作时,数据会被存储在离RNF最近的HNF中。同时,CHI Stash还会进行数据的更新和转发,以保持Cache一致性。通过使用CHI Stash,可以提高系统的性能,并增强功能。 总之,CHI Stash是一种用于解决组件系统中Cache一致性问题的方案,它可以对数据进行存储、更新和转发,以保持Cache的一致性,并提高系统的性能。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [CHI 学习思路---CHI到底是干嘛的,有什么用](https://blog.csdn.net/q876507447/article/details/117674831)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [CHI和ACE5-LITE的stash问题](https://blog.csdn.net/weixin_45270982/article/details/123841332)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值