Page MenuHomeFreeBSD

hwpmc: count each AMD PMC interrupt once
Needs ReviewPublic

Authored by afscoelho_gmail.com on Wed, Sep 30, 9:09 PM.

Details

Reviewers
mhorne
ali_mashtizadeh.com
gnn
Group Reviewers
pmc
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