Hi Peter,
On Wed, Aug 7, 2024 at 4:56 AM Peter Zijlstra <peterz@infradead.org> 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@kernel.org>
Thanks,
Namhyung