as far as I understand, ReadUnique results from store instruction execution, which gets cacheline missed in local cache from peer core's cache or memory. After ReadUnique finishes, the write data is stored into new cacheline and its state transitions to UD. But as per CHI SPEC shown as below, the final state is UC if not PASS DIRTY or UD if PASS DIRTY. it seems like the data store is not taken into account.
why?
A ReadUnique should be used by Requester when it intends to perform a store to cache line.
However, there is no requirement that the store is performed immediately or atomically, and so the cache line can finish in a UniqueClean state if it was received in a UC state. No data will be lost if the Requester does not perform the store as the ReadUnique returns the original data to the manager.
By contrast, something like a MakeUnique does require that the store is performed atomically with the completing of the request as a MakeUnique will cause the cache line to invalidated in the rest of the system and no data is returned to the Requester. Hence, MakeUnique must always finish in a UniqueDirty state.
thank you for your reply!
according to your answer, is the following scenario possible?
1. RN0 and RN1 initiate ReadUnique to the same cacheline at the same time, but they do not perform store data immediately when they receive read data. RN1 retains valid cacheline at last.
2. RN0 performs store operation, and then it have to send ReadUnique again ,which invalidates cacheline in RN1 before RN1 write data into this cacheline.
3. RN1 performs store operation, and then it also resend ReadUnique, which invalidates cacheline in RN0 before RN0 writes data into cache.
4. Go to 2.
So this cacheline is transferred between RN0 and RN1 repeatly, and No one can finish store.
is it a possible cause of LiveLock?
This should not be a realistic possibility.
If the RN is required to store to a cache line and issues a ReadUnique, then there should be no reason why it does not store to the line when the ReadUnique completes (ignoring exclusive sequences). If an RN delays storing to a cache line, then it is always at risk of losing the cache line before it has performed the store.
The general point here is that there is no requirement that a ReadUnique finishes in a Dirty state, as the RN is not required to update the cache line. If the RN does wish to update the cache line, then it should do this immediately.