Messages in this thread | | | Date | Fri, 25 Mar 2022 23:45:06 +0800 | Subject | Re: [External] Re: [PATCH v3 3/5] perf/core: Don't need event_filter_match in merge_sched_in() | From | Chengming Zhou <> |
| |
On 2022/3/25 23:11, Liang, Kan wrote: > > > On 3/24/2022 11:53 PM, Chengming Zhou wrote: >> There is one obselete comment in perf_cgroup_switch(), since >> we don't use event_filter_match() when event_sched_out(). >> >> Then found we needn't to use event_filter_match() in >> merge_sched_in() too. Because now we use the perf_event groups >> RB-tree to get the exact matched perf_events, don't need to >> go through the event_filter_match() to check if matched again. >> >> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com> >> --- >> kernel/events/core.c | 6 ++---- >> 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/kernel/events/core.c b/kernel/events/core.c >> index dd985c77bc37..225d408deb1a 100644 >> --- a/kernel/events/core.c >> +++ b/kernel/events/core.c >> @@ -856,7 +856,8 @@ static void perf_cgroup_switch(struct task_struct *task, int mode) >> cpu_ctx_sched_out(cpuctx, EVENT_ALL); >> /* >> * must not be done before ctxswout due >> - * to event_filter_match() in event_sched_out() >> + * to update_cgrp_time_from_cpuctx() in >> + * ctx_sched_out() >> */ >> cpuctx->cgrp = NULL; >> } >> @@ -3804,9 +3805,6 @@ static int merge_sched_in(struct perf_event *event, void *data) >> if (event->state <= PERF_EVENT_STATE_OFF) >> return 0; >> - if (!event_filter_match(event)) >> - return 0; >> - > > Both X86 and Arm implemented PMU specific filter_match callback for the hybrid system. I think the check is still required at least for the hybrid system. >
Ah, I ignored this point, will fix it.
Thanks.
> > Thanks, > Kan >> if (group_can_go_on(event, cpuctx, *can_add_hw)) { >> if (!group_sched_in(event, cpuctx, ctx)) >> list_add_tail(&event->active_list, get_event_list(event));
| |