[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <45f2b6a4-f513-48ba-9667-bbc726aba804@amd.com>
Date: Fri, 3 Jan 2025 09:59:13 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, willy@...radead.org, acme@...nel.org,
namhyung@...nel.org, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org, irogers@...gle.com,
adrian.hunter@...el.com, kan.liang@...ux.intel.com, mingo@...nel.org,
lucas.demarchi@...el.com, Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH 19/19] perf: Make perf_pmu_unregister() useable
Hi Peter,
> @@ -12294,6 +12458,13 @@ perf_event_alloc(struct perf_event_attr
>
> perf_event__state_init(event);
>
> + /*
> + * Hold SRCU critical section around perf_init_event(), until returning
> + * the fully formed event put on pmu->events_list. This ensures that
> + * perf_pmu_unregister() will see any in-progress event creation that
> + * races.
> + */
> + guard(srcu)(&pmus_srcu);
Minor nit. This can go down a bit, just right before perf_init_event() ?
Thanks,
Ravi
Powered by blists - more mailing lists