Re: [PATCH] perf/core: update outdated comment for refactored ctx_flexible_sched_in()
From: Ian Rogers
Date: Tue Sep 15 2026 - 17:38:18 EST
On Sat, Mar 21, 2026 at 3:58 AM Kexin Sun <kexinsun@xxxxxxxxxxxxxxxx> wrote:
>
> ctx_flexible_sched_in() was split into pmu_groups_sched_in()
> for scheduling a single PMU's event groups and ctx_groups_sched_in()
> for iterating over PMU contexts by commit f06cc667f799 ("perf:
> Optimize perf_cgroup_switch()"). ctx_groups_sched_in() was then
> folded into __pmu_ctx_sched_in() by commit 2d17cf1abcbe ("perf:
> Optimize context reschedule for single PMU cases").
>
> __pmu_ctx_sched_in() is now the function that schedules flexible
> events and may re-set rotate_necessary. Update the references to
> ctx_flexible_sched_in() accordingly.
>
> Assisted-by: unnamed:deepseek-v3.2 coccinelle
> Signed-off-by: Kexin Sun <kexinsun@xxxxxxxxxxxxxxxx>
Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
Thanks,
Ian
> ---
> kernel/events/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index ac70d68217b6..463440774f26 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -3556,7 +3556,7 @@ static void __pmu_ctx_sched_out(struct perf_event_pmu_context *pmu_ctx,
> /*
> * Since we cleared EVENT_FLEXIBLE, also clear
> * rotate_necessary, is will be reset by
> - * ctx_flexible_sched_in() when needed.
> + * __pmu_ctx_sched_in() when needed.
> */
> pmu_ctx->rotate_necessary = 0;
> }
> @@ -4575,7 +4575,7 @@ ctx_event_to_rotate(struct perf_event_pmu_context *pmu_ctx)
>
> out:
> /*
> - * Unconditionally clear rotate_necessary; if ctx_flexible_sched_in()
> + * Unconditionally clear rotate_necessary; if __pmu_ctx_sched_in()
> * finds there are unschedulable events, it will set it again.
> */
> pmu_ctx->rotate_necessary = 0;
> --
> 2.25.1
>