CHI中的exclusive访问

Exclusive accesses
包含两类:
• Exclusive accesses to a Snoopable memory location. 
• Exclusive accesses to a Non-snoopable memory location.

(参考了(1条消息) CHI的Cache Stashing和DVM操作_谷公子的藏经阁的博客-CSDN博客
=====================Snoopable memory location========================
□ 对于snoopable的memory空间,需要使用两个monitor来track;
LP monitor
□ 每个RNF中的LP, 需要实现一个exclusive monitor,来track exclusive sequence;
        □ 当执行exclusive load时,LP monitor将对应的地址标记为1;
        □ 当发生如下情况时,将LP monitor对应地址标记为0;    
                其他LP将我本地的这条cacheline给invalid掉了;
                当前这个LP, 发送了一个相同地址的store操作(exclusive的也要reset?);There is a store to the location by the same LP. Resetting the monitor, if the store from the same LP is Non-exclusive, is IMPLEMENTATION DEFINED.
    
Poc monitor:
□ HNF必须实现一个POCmonitor, 用来判断exclusive store pass or fail;
□ 如果成功,表明该transaction已经对其它一致性RN-F可见。如果失败,表明该transaction没有对其它一致性RN-F可见,因此Exclusive Store不能成功;
□ 这个monitor用来保证,某个LP发出的exclusive store操作,只有在没有收到其他LP发出的访问相同地址的snoop操作的时候,才会成功;
□ 对这个POC monitor最小的需求,就是可以记录其他LP发出了和当前的exclusive sequence相关的snoopable trans;
    
□ 如果某个RN已经发送了exclusive load命令,在此期间,其他RN没有发送exclusive store,那么当它发送exclusive store时,就一定会成功;
□ 该monitor可以并行检测所有LP的exclusive访问;
□ 当HNF接受了exclusive load/store的访问后,就会在monitor内部注册该LP正在进行exclusive的操作;
□ 当HNF收到exclusive store时:
        □ 如果当前monitor中,该LP已经注册了正在执行exclusive, 也就是说,没有被其他LP的exclusive store给reset, 那么这个exclusive store的操作是成功的,并且可以继续处理;这种场景下,其他LP注册的信息,都应该被复位;协议推荐,当前这个LP的exclusive注册信息可以被保留;
        □ 如果某个LP, 还没有在monitor中进行过exclusive sequence注册,也就是说,他被其他LP的exclusive store给复位了,则此次store操作不成功,不能继续处理,但是monitor还是要注册该LP正在进行exclusive sequence;
        □ 当某个exclusive store访问成功后,所有的LP的记录信息都会被reset, 直到这个exclusive store的compack收到后,其他LP才能够继续注册;


Additional address comparison
□ Poc monitor可以做一些升级,提供地址比对的能力;这种地址比对,只需要比对部分bits, 不需要比对整条cacheline(不一定是cacheline?), 这样可以减少不同LP访问同一条cacheline不同bit的exclusive store失败的概率;具体比对哪些bit, 是自定义的;
□ 该地址会在刚开始的时候被记录,当其他LP访问的地址match的时候,被reset;
□ 这种地址比较是额外添加的,所有对于POCmonitor而言,每个LP,仍然需要1bit的指示信号,用来检测每个LP的exclusive操作;
□ 在如下条件发生时,exclusive store可以被执行:
        □ Addr monitor已经被同一个LP, 访问相同地址的exclusive sequence给注册了,同时没有被其他LP的相同地址的exclusive store给reset掉;
        □ 1 bit的lp exclusive访问指示信号,没有被清掉;
Alternatives to a PoC monitor
□ HNF可以使用如下的一些机制,来代替POC monitor,决定exclusive access的结果:
        □ 精确的snoop filter; 跟踪当RN发送exclusive store时,是否有该某cacheline的copy;
        □ 通过检测HN发送的snoop, 来判断RN是否仍然保留该cahceline;


========================Non-snoopable memory location======================
只需要一个系统monitor;
System monitor
□ 用来跟踪记录对non-snooopable的exclusive访问;该monitor通过readnosnp(excl) trans set, 通过其他LP的写,reset;
□ 可以放在POS或者endpoint device;因为endpoint的个数肯定远远大于POS点的个数,因此,推荐放在POS点,可以:
        □ 减少monitor开销;
        □ 减少检测exclusive访问是否成功的时间开销;


==========================Exclusive transactions=============================
• Exclusive Load transaction to a Snoopable location: 
— ReadClean 
— ReadNotSharedDirty 
— ReadShared 
— ReadPreferUnique 
• Exclusive Store transaction to a Snoopable location: 
— CleanUnique 
— MakeReadUnique

• Exclusive Load transaction to a Non-snoopable location: 
— ReadNoSnp 
• Exclusive Store transaction to a Non-snoopable location: 
— WriteNoSnp

Responses to exclusive requests
□ 基本同正常的命令,只有如下区别:
□ ReadClean, ReadNotSharedDirty, and ReadShared Exclusive transactions: 
        □ Must not use separate Comp and data response. (主要是不知道结果)
        □ Requests that do not fail must not use either DMT or DCT.(HNF要更新状态?)
        □ ReadNoSnp Exclusive transactions that do not fail, must not use DMT.
□ WriteNoSnpFull and WriteNoSnpPtl transactions, must not use DWT if the Exclusive monitor is located at the Home and the Exclusive check passes.
□ RespErr域值为0b01表示Exclusive Okay,即exclusive成功,RespErr域值为0b00表示Normal Okay,即exclusive失败;
□ 对于exclusive访问的一些场景,可以参考Table 6-1 Responses to an Exclusive access request
 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值