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

MSR in offline package

Mustafa_K_
Beginner
613 Views

Hi,

I am trying to read package energy status MSR using various idle/busy cores. 

In some of the cases, I disable all the cores of a particular package using linux file system. Disabling cores

also disables accessing to MSRs. So Is there a way to read package specific MSR even all the cores of that particular package are offline?

Thank you,

Mustafa

0 Kudos
2 Replies
Babis_C_
Beginner
613 Views

I ran into the same issue a couple of weeks ago. More particularly, I was disabling all cores of one CPU and then I wanted to have access to RAPL MSRs for this CPU.

As you ve, probably, seen the /dev/cpu/* dirs for the disabled cores are missing. I thought I could write to registers directly and get the information I needed, but I came to understand that each set of MSR addresses are per core, i.e. when accessing the performance counter selector 0, at address 0x186 from each core, you re gonna address the private performance counter selector 0 of each core. If I m right, once you disable one CPU it s impossible to access its MSRs.

 

Cheers,

Babis

0 Kudos
McCalpinJohn
Honored Contributor III
613 Views

Normally you have to be running on one of the cores of a chip to read an MSR on that chip.  Linux does this by setting up an interprocessor interrupt to get the target processor to execute the RDMSR instruction.  Obviously this is a problem if Linux can't see any processors on the target chip....

There might be an alternative approach via System Management Mode (perhaps exposed as a UEFI runtime service?), but if I understand correctly that would require modification of the BIOS.

0 Kudos
Reply