From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751840AbdAYNC6 (ORCPT ); Wed, 25 Jan 2017 08:02:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49344 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751752AbdAYNC5 (ORCPT ); Wed, 25 Jan 2017 08:02:57 -0500 Date: Wed, 25 Jan 2017 14:02:54 +0100 From: Jiri Olsa To: Peter Zijlstra Cc: Jiri Olsa , lkml , Ingo Molnar , Andi Kleen , Alexander Shishkin , Arnaldo Carvalho de Melo , Vince Weaver Subject: Re: [PATCH 4/4] perf/x86/intel: Throttle PEBS events only from pmi Message-ID: <20170125130254.GB24586@krava> References: <1482931866-6018-1-git-send-email-jolsa@kernel.org> <1482931866-6018-5-git-send-email-jolsa@kernel.org> <20170124164122.GL25813@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170124164122.GL25813@worktop.programming.kicks-ass.net> User-Agent: Mutt/1.7.1 (2016-10-04) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 25 Jan 2017 13:02:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 24, 2017 at 05:41:22PM +0100, Peter Zijlstra wrote: SNIP > --- > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c > index 1635c0c8df23..a95707a4140f 100644 > --- a/arch/x86/events/core.c > +++ b/arch/x86/events/core.c > @@ -1343,6 +1343,8 @@ void x86_pmu_stop(struct perf_event *event, int flags) > cpuc->events[hwc->idx] = NULL; > WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED); > hwc->state |= PERF_HES_STOPPED; > + } else { > + hwc->state |= PERF_HES_ARCH; > } > > if ((flags & PERF_EF_UPDATE) && !(hwc->state & PERF_HES_UPTODATE)) { I think that will work, I'll try to test it jirka