Re: [PATCH 0/5] perf: Per PMU context reschedule and misc
From: Namhyung Kim
Date: Wed Aug 07 2024 - 14:55:00 EST
Hi Peter,
On Wed, Aug 7, 2024 at 4:56 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> Hi,
>
> This is 'fallout' from Namhyung posting his per-pmu ctx_resched() patches. It
> started with me trying to clean up and get rid of corner cases, and then got
> involved when Kan noted the time keeping issue.
>
> Anyway, please review / test.
It works blazingly fast!
# ./stress-pmu
delta: 0.000307 sec (3 usec/op)
I found a problem with my patch that it called __pmu_ctx_sched_out() for
nothing (I guess is_active only has EVENT_TIME). I thought ctx_sched_out()
would stop if it doesn't change EVENT_ALL but it iterated all PMUs anyway.
But with this change we don't need ctx_sched_out(EVENT_TIME) anymore.
Reviewed-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Thanks,
Namhyung