Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

How many MSRs can I use

Zhou__Fang
Beginner
729 Views

Hi All,

I successfully write event information to MSRs from 0x186 to 0x189. However, I found it returns error starting from address 0x18a.

The CPU I'm using is Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz. I check the developer manual and search online, but find nothing.

Does anyone know how many MSRs can I use? It seems only 4 for my CPU?

Thanks in advance.

0 Kudos
2 Replies
HadiBrais
New Contributor III
729 Views

This is documented in Chapter 18 of the Intel developer manual Volume 3. For your Skylake processor, see Table 18-33. There are 8 general-purpose registers per core. If hyperthreading is enabled, then they are statically partitioned evenly between the two threads of the same core, i.e., each thread has 4 counter registers. So the last valid counter MSR is 0x189. This is probably why you're not able to write beyond 0x189. If hyperthreading is disabled, all of the 8 registers are available and so you can address up to MSR 0x18D on each core. Note that if you want to do full-width (48-bit) writes, you have to use the aliasing MSRs starting at 0x4C1.

0 Kudos
Zhou__Fang
Beginner
729 Views

Thank you so much. It makes sense since hyperthreading is enable in my Linux. I will read the related part you mentioned. Thanks again.

 

0 Kudos
Reply