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

performance monitoring PMI

yao__cody
ビギナー
4,445件の閲覧回数

Dear all,

This is a question about performance monitoring interrupt based on PMU in uncore。

In Linux kernel,I can not find the code supported this feature when uncore counter overflow, which poll these counter with setting hrtimer.

Then, I write these control and counter register through msr tools, and print info in perf_event_nmi_handler to confirm whether pmi is sended, but no info printed.

So I want to know whether pmi is supported in uncore,because I find this feature in uncore spec.

 

thanks

cody

 

 

0 件の賞賛
1 解決策
McCalpinJohn
名誉コントリビューター III
4,445件の閲覧回数

Only a few Intel processors support interrupt generation for uncore performance counter overflow, so I would not be surprised if the Linux kernel folks decided that it was not worth the effort to support.  (But I have not run across any discussions of this particular topic, so I don't know for sure.)

One of the main reasons for supporting interrupt on overflow is so that the interrupt handler can unwind the user stack and associate the overflow with the execution of a specific piece of code.   With very few exceptions, uncore performance counter events can't be associated with specific cores, so it is not typically possible to associate the event with a particular core and/or a particular user thread.

元の投稿で解決策を見る

3 返答(返信)
McCalpinJohn
名誉コントリビューター III
4,446件の閲覧回数

Only a few Intel processors support interrupt generation for uncore performance counter overflow, so I would not be surprised if the Linux kernel folks decided that it was not worth the effort to support.  (But I have not run across any discussions of this particular topic, so I don't know for sure.)

One of the main reasons for supporting interrupt on overflow is so that the interrupt handler can unwind the user stack and associate the overflow with the execution of a specific piece of code.   With very few exceptions, uncore performance counter events can't be associated with specific cores, so it is not typically possible to associate the event with a particular core and/or a particular user thread.

yao__cody
ビギナー
4,445件の閲覧回数

 I understand what you mean, thank you very much ^_^

This feature is mentioned in uncore performance monitoring manual,so the uncore PMI may have other functions.  Although Linux kernel doesn't support, it Is there any way to  test whether this feature is supported on hardware in my platform?  

McCalpinJohn
名誉コントリビューター III
4,445件の閲覧回数

If the uncore performance monitoring guide says that the feature is supported by your processor, then it probably works as described.  It looks easy enough to set up the U_MSR_PMON_GLOBAL_CTL register to enable uncore PMIs, and it is certainly easy to enable interrupt on overflow in the various unit performance monitor control registers (by setting bit 20 in addition to whatever else you are counting).   I don't know anything about how the interrupt handler is implemented, but if one is not present the system will probably log a message of the form:

Uhhuh. NMI received for unknown reason xx on CPU yy.

Interrupt on overflow of an uncore performance counter is still a useful feature for socket-level monitoring -- especially for the uncore counters that are related to error conditions. 

返信