]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
perf/core: Don't pass task around when ctx sched in
authorChengming Zhou <zhouchengming@bytedance.com>
Tue, 29 Mar 2022 15:45:20 +0000 (23:45 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 5 Apr 2022 07:59:44 +0000 (09:59 +0200)
commita0827713e298d021d3c79ae7423aea408f3f7c3a
tree2a98988caf2ee4685ba5dedb0805bfa3acc4e561
parente590928de7547454469693da9bc7ffd562e54b7e
perf/core: Don't pass task around when ctx sched in

The current code pass task around for ctx_sched_in(), only
to get perf_cgroup of the task, then update the timestamp
of it and its ancestors and set them to active.

But we can use cpuctx->cgrp to get active perf_cgroup and
its ancestors since cpuctx->cgrp has been set before
ctx_sched_in().

This patch remove the task argument in ctx_sched_in()
and cleanup related code.

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220329154523.86438-2-zhouchengming@bytedance.com
kernel/events/core.c