What does Intel mean by "retired"?

12,520

In the context "retired" means: the instruction (microoperation, μop) leaves the "Retirement Unit". It means that in Out-of-order CPU pipeline the instruction is finally executed and its results are correct and visible in the architectural state as if they execute in-order. In performance context this is the number you should check to compute how many instructions were really executed (with useful output). If your context is energy saving, you may check how many instructions started their execution in OOO pipeline ("ISSUED" counter or "EXECUTED" counter) and compare the number with count of retired operation; high difference shows that CPU does a lot of useless work and uses excess power.

Short description of the Retirement unit is here: http://users.utcluj.ro/~baruch/book_ssce/SSCE-Intel-Pipeline.pdf

5.4.7.4. Retirement Unit

The retirement unit writes the results of speculatively executed microoperations into the user-visible registers and removes the microoperations from the reorder buffer. Like the reservation station, the retirement unit continuously checks the status of microoperations in the reorder buffer, looking for ones that have been executed and no longer have any dependencies with other microoperations in the instruction pool. It then retires completed microoperations in their original program order.

The retirement unit can retire three microoperations per clock cycle (/<-- this may be outdated/). In retiring a microoperation, it writes the results to the processor’s register file and/or memory. After the results have been written, the microoperation is removed from the re-order buffer.

More detailed information about unit is here (by Agner Fog) http://www.agner.org/optimize/microarchitecture.pdf chapter Retirement for your CPU

Share:
12,520
merlin2011
Author by

merlin2011

I am a student. A perpetual student. For the convenience of those who Google and copy &amp; paste resulting URL, feel free to try my plugins for Firefox and Chrome. I have recently released my primary project Arachne, a lightning-fast cooperative threading library. Please give it a whirl and create an issue if you see any problems. I have also written a few simple tools, such as one for tmux automation, an improved version of the venerable Unix column, and a tool for adding color to text in the terminal based on user-specified patterns.

Updated on June 14, 2022

Comments

  • merlin2011
    merlin2011 almost 2 years

    In the Intel Manual, there is mention of a lot of performance events which have descriptions like "Mispredicted taken branch instructions retired.". What exactly does retired mean in this context?

    Note that I have already looked at Intel's Performance Analysis Guide, which states that "retired" has a very precise meaning (on page 8), referring to the diagram on page 7, but I think I lack the background knowledge to understand exactly what is mean by Retirement / Writeback. What exactly is that process and what does it involve?