mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 12:46:49 +07:00
perf/core: Fix perf_event_enable_on_exec() timekeeping (again)
Where commit:7fce250915
("perf: Fix scaling vs. perf_event_enable_on_exec()") disabled the ctx-time a-priory, such that all events get enabled and scheduled at the time point in time, there is one hole in that patch, when no events do get enabled nothing re-enables the ctx-time. Reported-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Fixes:7fce250915
("perf: Fix scaling vs. perf_event_enable_on_exec()") Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
279b5165ff
commit
7bbba0eb1a
@ -3522,6 +3522,8 @@ static void perf_event_enable_on_exec(int ctxn)
|
||||
if (enabled) {
|
||||
clone_ctx = unclone_ctx(ctx);
|
||||
ctx_resched(cpuctx, ctx, event_type);
|
||||
} else {
|
||||
ctx_sched_in(ctx, cpuctx, EVENT_TIME, current);
|
||||
}
|
||||
perf_ctx_unlock(cpuctx, ctx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user