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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54EB5A1F.70306@gmail.com>
Date:	Mon, 23 Feb 2015 09:49:35 -0700
From:	David Ahern <dsahern@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf/x86: Remove redundant calls to perf_pmu_{dis|en}able

Hi Peter:

On 2/18/15 10:45 AM, David Ahern wrote:
> perf_pmu_disable is called before pmu->add and perf_pmu_enable is called
> afterwards. No need to call these inside of x86_pmu_add as well.

Does this make sense or did I miss something about the 
pmu_enable/disable functions?

David

>
> Signed-off-by: David Ahern <dsahern@...il.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> ---
>   arch/x86/kernel/cpu/perf_event.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
> index b71a7f86d68a..2d1675816bef 100644
> --- a/arch/x86/kernel/cpu/perf_event.c
> +++ b/arch/x86/kernel/cpu/perf_event.c
> @@ -1033,7 +1033,6 @@ static int x86_pmu_add(struct perf_event *event, int flags)
>
>   	hwc = &event->hw;
>
> -	perf_pmu_disable(event->pmu);
>   	n0 = cpuc->n_events;
>   	ret = n = collect_events(cpuc, event, false);
>   	if (ret < 0)
> @@ -1071,7 +1070,6 @@ static int x86_pmu_add(struct perf_event *event, int flags)
>
>   	ret = 0;
>   out:
> -	perf_pmu_enable(event->pmu);
>   	return ret;
>   }
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ