diff options
author | Kan Liang <kan.liang@linux.intel.com> | 2020-08-21 12:57:53 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-09-10 11:19:34 +0200 |
commit | 44fae179ce73a26733d9e2d346da4e1a1cb94647 (patch) | |
tree | 58ae1e7e339127053c3ac96b445c75cff1b470b0 /samples/Kconfig | |
parent | 556cccad389717d6eb4f5a24b45ff41cad3aaabf (diff) |
perf/core: Pull pmu::sched_task() into perf_event_context_sched_out()
The pmu::sched_task() is a context switch callback. It passes the
cpuctx->task_ctx as a parameter to the lower code. To find the
cpuctx->task_ctx, the current code iterates a cpuctx list.
The same context will iterated in perf_event_context_sched_out() soon.
Share the cpuctx->task_ctx can avoid the unnecessary iteration of the
cpuctx list.
The pmu::sched_task() is also required for the optimization case for
equivalent contexts.
The task_ctx_sched_out() will eventually disable and reenable the PMU
when schedule out events. Add perf_pmu_disable() and perf_pmu_enable()
around task_ctx_sched_out() don't break anything.
Drop the cpuctx->ctx.lock for the pmu::sched_task(). The lock is for
per-CPU context, which is not necessary for the per-task context
schedule.
No one uses sched_cb_entry, perf_sched_cb_usages, sched_cb_list, and
perf_pmu_sched_task() any more.
Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200821195754.20159-2-kan.liang@linux.intel.com
Diffstat (limited to 'samples/Kconfig')
0 files changed, 0 insertions, 0 deletions