lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 25 Mar 2022 11:11:28 -0400
From:   "Liang, Kan" <kan.liang@...ux.intel.com>
To:     Chengming Zhou <zhouchengming@...edance.com>, peterz@...radead.org,
        mingo@...hat.com, acme@...nel.org, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
        namhyung@...nel.org, eranian@...gle.com
Cc:     linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        duanxiongchun@...edance.com, songmuchun@...edance.com
Subject: Re: [PATCH v3 3/5] perf/core: Don't need event_filter_match in
 merge_sched_in()



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@...edance.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.


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));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ