HomeFreeBSD

pmc_process_csw_out: ignore deleted counters

Description

pmc_process_csw_out: ignore deleted counters

I see the fllowing panic on AMD when exiting pmcstat:

panic: [pmc,1473] pp_pmcval outside of expected range cpu=2 ri=17
pp_pmcval=fffffffffa529f5b pm_reloadcount=10000

It seems that at least on AMD a performance counter keeps counting after
overflowing. When pmcstat exits it sets counters that it used to
PMC_STATE_DELETED and waits until their use count goes to zero.
amd_intr() wouldn't reload a counter in that state and, thus, a counter
would be allowed to overflow. That means that the counter's value would
be allowed to go outside the expected range.

MFC after: 2 weeks

Details

Provenance
avgAuthored on
Parents
rS308479: fix a watchdogd regression introduced in r308040
Branches
Unknown
Tags
Unknown