On Fri, May 19, 2017 at 08:06:09PM +0800, Jin, Yao wrote:
SNIPAh, I was more thinking of something like PERF_PMU_CAP_NO_SKID or
I would much rather see this in generic code, somewhere aroundYes, moving to generic code is better. Thanks for the suggestion! I will do
__perf_event_overflow() I suppose. That would retain proper accounting
for the interrupt rate etc..
Also it would work for all architectures. Because I'm thinking more than
just x86 will suffer from skid.
that.
If you're really worried, I suppose you can put it behind a PERF_PMU_CAPI guess what you are suggesting is to add checking like:
flag or something.
if (is_sampling_event(event)) {
if (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT) {
return;
}
}
something that would skip the test and preserve current behaviour.