3 ms·
But the read of turn will not be eternally mirrored to the original write - at some point the rename file eventually moves on when the original store (an observ
by chrisseaton 6y ago
But the read of turn will not be eternally mirrored to the original write - at some point the rename file eventually moves on when the original store (an observable side effect) retires like a register renaming.
Notice that your code has a backward jump between the write and the read and the example in the article (and the code of the other person I replied to) does not.
There is no logic needed to interrupt the renaming such as a signal from another core holding the cache, the rename just naturally retires beyond a certain point.
Read Morris Marden's 2014 patent on it for more details.
https://patentimages.storage.googleapis.com/16/3f/47/ea087053376a3a/US20140095814A1.pdf https://patentimages.storage.googleapis.com/16/3f/47/ea08705...
- millstone 6y agoHmm, what's the advantage of doing memory renaming for unretired stores? Won't the value just be forwarded from the store buffer? The patent is a great resource, thanks for that. But I think it supports my point when it suggests that memory renaming may persist indefinitely: Alternatively, reclamation of the original physical register could be delayed to facilitate later memory renaming. and later: ...the MRT may always retain physical registers of N past store operations...the physical register is reclaimed to the free list when it exits the MRT, for example, when it is no longer one of the N most recent store operations. So it's possible. I don't think we know from Agner's work whether AMD went this route or not.
- gpderetta 6y agoStore forwarding is slower, it is usually as fast a reading from L1 directly in the best case (4-5 cycles). This optimization has a latency of 0-1 cycles.