Page MenuHomeFreeBSD

hwpmc: count each AMD PMC interrupt once
ClosedPublic

Authored by afscoelho_gmail.com on Wed, Sep 30, 9:09 PM.
Tags
None
Referenced Files
F174667486: D60185.diff
Mon, Oct 5, 1:55 AM
F174659026: D60185.id188312.diff
Mon, Oct 5, 12:43 AM
F174656093: D60185.id188395.diff
Mon, Oct 5, 12:16 AM
F174608553: D60185.diff
Sun, Oct 4, 3:43 PM
Unknown Object (File)
Sun, Oct 4, 1:02 AM
Unknown Object (File)
Sun, Oct 4, 12:59 AM
Unknown Object (File)
Sat, Oct 3, 10:07 AM
Unknown Object (File)
Sat, Oct 3, 6:01 AM
Subscribers

Details

Summary

amd_intr() and amd_intr_v2() call pmc_ibs_intr() and then update
kern.hwpmc.stats.intr_processed or intr_ignored. pmc_ibs_intr() also
updated them. So each core PMC NMI was also counted as ignored, and
each IBS NMI was counted as processed two times.

Update the statistics only in the caller.

Fixes: e51ef8ae490f ("hwpmc: Initial support for AMD IBS")
Sponsored by: AMD

Test Plan

Run any sampling session, e.g. pmcstat -S instructions or -S ibs-op,
then read kern.hwpmc.stats.intr_processed and intr_ignored.

Before: intr_ignored == intr_processed.
After: intr_ignored stays 0.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77562
Build 74445: arc lint + arc unit

Event Timeline

mhorne added inline comments.
sys/dev/hwpmc/hwpmc_ibs.c
700

This is also mirrored in amd_intr() and can be dropped. (Only affects debug builds).

748

Same here.

This revision is now accepted and ready to land.Thu, Oct 1, 12:57 PM
This revision now requires review to proceed.Thu, Oct 1, 1:30 PM

Thanks for the review

This revision is now accepted and ready to land.Thu, Oct 1, 3:41 PM
This revision was automatically updated to reflect the committed changes.