Reprogramming Uncore Counters on the fly

Reprogramming Uncore Counters on the fly

I'm working on a project to log all DRAM metrics available for measuring in the Intel Memory Controller (full list of these can be seen in the Intel Xeon Processor E5-2600 Product Family Uncore Performance Monitoring Guide, page 63, Table 2-64) on a Jaketown system. Ideally, this would work by programming the counters with a certain event code and umask, waiting an interval of a second or so, getting the delta between values, then reprogramming the uncore counters and starting all over again. I've been able to modify the method JKT_Uncore_Pci::program so that I can pass in the event code and umask as variables; however, the data I've been getting out suggests that I'm not actually reconfiguring the counters to count their intended metrics when calling the method (i.e. all of the data is similar in value). The values I've been getting for ECC_CORRECTABLE_ERRORS in particular seems fishy; it seems unlikely that I'd be getting in the neighborhood of ~2000 ECC events every second, especially for a server system otherwise at rest. 

Is it possible to reprogram these registers on the fly? Do they need to be frozen to be reprogrammed? I did not remove the code to freeze the registers from the method JKT_Uncore_Pci; however, there's always the possibility that they need to be locked by some other method. 

6 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

How do you access Uncore PMU?I mean do you use kernel mode driver or user mode API?

I'm  writing simple driver which will access Uncore PMU with the help of inline assembly , my code only tries to read CBo Cn_MSR_PMON_CTRn registers.

What do you mean by reprogramming on the fly?Without the freezing of Cn_MSR_PMON_CTLn bitfield?

Nash,

to reprogram iMC PMU you need to setup a new monitoring session following the steps described in section 2.1.1 of the manual you mentioned. This is implemented in JKT_Uncore_Pci::program PCM function.

Thanks,

Roman

Zitat:

Roman Dementiev (Intel) schrieb:

Nash,

to reprogram iMC PMU you need to setup a new monitoring session following the steps described in section 2.1.1 of the manual you mentioned. This is implemented in JKT_Uncore_Pci::program PCM function.

Thanks,

Roman

Roman,

Is it not possible to call JKT_uncore_pci::program in a fashion like this: 

PCM *m = PCM::getInstance();
JKT_Uncore_Pci *uncore = new JKT_Uncore_Pci((uint32)0, m);
uncore->program(uint32 event, uint32 umask);

I did a little tinkering under the hood so that it's only programming a single register (MC_CH_PCI_PMON_CTL0), and so the method JKT_Uncore_Pci::program method accepts variables for the event code and umask code. For some reason, however, it doesn't seem to be changing the output of the registers- the output seems to be in the same ballpark, regardless of what I pass into the program method. I'm sampling and taking a delta once per second, if that's any help.

Thanks for your help,

NR

Please disregard my last post; I figured out where my error was. Turns out you need to be programming the correct socket to get any appreciable sort of change in the counters when calling the program method (which I wasn't doing). Thanks for your assistance!

Nash, you are welcome.

Melden Sie sich an, um einen Kommentar zu hinterlassen.