From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751395AbdK0JZk (ORCPT ); Mon, 27 Nov 2017 04:25:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59152 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbdK0JZj (ORCPT ); Mon, 27 Nov 2017 04:25:39 -0500 Date: Mon, 27 Nov 2017 10:25:37 +0100 From: Jiri Olsa To: Milind Chabbi Cc: Peter Zijlstra , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf/core: Enable the bp only if the .disable field is 0. Message-ID: <20171127092438.GA23704@krava> References: <20171126193132.GA7595@krava> <1511765030-20132-1-git-send-email-chabbi.milind@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 27 Nov 2017 09:25:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 26, 2017 at 10:50:27PM -0800, Milind Chabbi wrote: > On Sun, Nov 26, 2017 at 10:43 PM, Milind Chabbi wrote: > > Signed-off-by: Milind Chabbi > > --- > > kernel/events/core.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/kernel/events/core.c b/kernel/events/core.c > > index 35747a58ffb4..1b8eae85e9de 100644 > > --- a/kernel/events/core.c > > +++ b/kernel/events/core.c > > @@ -2659,7 +2659,8 @@ static int perf_event_modify_breakpoint(struct perf_event *bp, > > return err; > > } > > > > - _perf_event_enable(bp); > > + if (!attr->disabled) > > + _perf_event_enable(bp); > > return 0; > > } > > > > -- > > 2.14.1 > > > > Hi Jirka, > Thanks for your changes for proper accounting of the bp. > This additional change is needed so that we do not enable the bp if > the user has not asked to enable it. > I did the testing for ioctl and it continues to show the significant > speedups that I had originally seen. right, I'll merge this in and post thanks, jirka