Re: [RFC v2] perf: Rewrite core context handling

Peter Zijlstra
2022-06-13T18:36:56Z

On Mon, Jun 13, 2022 at 04:35:11PM +0200, Peter Zijlstra wrote:
> @@ -12125,6 +12232,8 @@ SYSCALL_DEFINE5(perf_event_open,
> goto err_task;
> }
>
> + // XXX premature; what if this is allowed, but we get moved to a PMU
> + // that doesn't have this.
> if (is_sampling_event(event)) {
> if (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT) {
> err = -EOPNOTSUPP;

No; this really should be against the event's native PMU. If the event
can't natively sample, it can't sample when placed in another group
either.