Hello, In AMBA ACE for a write miss we could us the ReadUnique Transaction, it says the transaction will snoop and get the data and invalidate the copies, the ACK from the Invalidated snoop masters/slave is required for the completer to do give the response, So on a hit in a shared state cache line still required to invalidate the copies and wait for the ACK to complete the Write right.consider my interconnect is slow take about 100 cycles for snoop req and resp, there any way where i could save those cycles..?
Hi Kidilam Firoz,
If your CPU supports it, you could try to prefetch the data for store in advance.
The A64 instruction is PRFM PSTxxx.
This is available from the C language as __builtin_prefetch(p, 1/*for write*/) with gcc for example.
Here is an example C function with disassembly on godbolt.
Best regards,
Vincent.
I appreciate the replay Vincent,The recommendation that you made will definitely reduce the no of cycle for the store operation.
However, I am worried about is there any way where i could do the store operation in shared state without waiting for the ACK - is it possible.(Currently i am using ReadUnique transaction in shared Hit even if i use CleanUnique there is no difference right i have to wait for the ACK for the Invalidation - if i can do something in that, that may reflect my IPC)
Regards,
Firoz
I don't see how you could transition the cache line state without a transaction, but is the MakeUnique transaction closer to what you describe, maybe? It would allow the SC -> UD transition. Also, the snoop filter will play a role in the performances here.
I think you do not need a ReadUnique transaction here as you already have the data locally; no need to re-obtain it. Therefore CleanUnique/MakeUnique make more sense here.
One way to avoid waiting for the ACK would be to decouple the "local" write from the coherency with a write buffer, for example. This might necessitates additional synchronization mechanisms (barriers) as well.
Thank You Vincent.I believe the suggestion you made will benefit me.