Messages in this thread | | | From | Namhyung Kim <> | Date | Wed, 11 Oct 2023 09:14:42 -0700 | Subject | Re: [PATCH v1] perf evlist: Avoid frequency mode for the dummy event |
| |
On Tue, Oct 3, 2023 at 4:02 PM Namhyung Kim <namhyung@kernel.org> wrote: > > On Tue, Oct 3, 2023 at 3:36 PM Ian Rogers <irogers@google.com> wrote: > > With the PMU disabled, isn't there still a risk of an interrupt still > > being in flight? In other words the disable doesn't prevent a race and > > we'll catch this on the next timer call to > > perf_adjust_freq_unthr_context. I think we can also improve the code > > by just disabling a PMU once, we can take advantage of the > > perf_event_pmu_context and disable that PMU, iterate its events and > > then re-enable the PMU - i.e. no need for an enable and disable per > > event. I'll put a patch together. > > Thanks, I was thinking about that too. It's also a side effect of > the context rewrite. Maybe we could iterate pmu_ctx's active lists > and skip pmus with PERF_PMU_CAP_NO_INTERRUPT and > individual non-sampling events.
Or we can add pmu_ctx->nr_freq and check it before accessing pmu MSRs.
Thanks, Namhyung
| |