Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933192AbcLNP7p (ORCPT ); Wed, 14 Dec 2016 10:59:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753369AbcLNP7o (ORCPT ); Wed, 14 Dec 2016 10:59:44 -0500 Date: Wed, 14 Dec 2016 16:59:40 +0100 From: Jiri Olsa To: Peter Zijlstra Cc: Robert Richter , "Liang, Kan" , Andi Kleen , Jiri Olsa , Vince Weaver , lkml , Ingo Molnar Subject: Re: [PATCH] perf/x86: Fix overlap counter scheduling bug Message-ID: <20161214155940.GA9180@krava> References: <1478015068-14052-1-git-send-email-jolsa@kernel.org> <20161108122039.GP3142@twins.programming.kicks-ass.net> <20161108150949.GM26852@two.firstfloor.org> <37D7C6CF3E00A74B8858931C1DB2F07750C8D9D0@SHSMSX103.ccr.corp.intel.com> <20161108165749.GJ3117@twins.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F07750C8DA4F@SHSMSX103.ccr.corp.intel.com> <20161108182739.GO3117@twins.programming.kicks-ass.net> <20161109142515.GY25086@rric.localdomain> <20161109155153.GQ3142@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161109155153.GQ3142@twins.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.30]); Wed, 14 Dec 2016 15:59:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1235 Lines: 42 On Wed, Nov 09, 2016 at 04:51:53PM +0100, Peter Zijlstra wrote: SNIP > > As per a prior mail, the masks on the PMU in question are: > > 0x01 - 0001 > 0x03 - 0011 > 0x0e - 1110 > 0x0c - 1100 > > But since all the masks that have overlap (0xe -> {0xc,0x3}) and (0x3 -> > 0x1) are of heavier weight, it should all work out I think. > > So yes, something like the below (removing the OVERLAP bit) looks like > its sufficient. Peter, could you please take this one? thanks, jirka > > --- > arch/x86/events/intel/uncore_snbep.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c > index 272427700d48..e6832be714bc 100644 > --- a/arch/x86/events/intel/uncore_snbep.c > +++ b/arch/x86/events/intel/uncore_snbep.c > @@ -669,7 +669,7 @@ static struct event_constraint snbep_uncore_cbox_constraints[] = { > UNCORE_EVENT_CONSTRAINT(0x1c, 0xc), > UNCORE_EVENT_CONSTRAINT(0x1d, 0xc), > UNCORE_EVENT_CONSTRAINT(0x1e, 0xc), > - EVENT_CONSTRAINT_OVERLAP(0x1f, 0xe, 0xff), > + UNCORE_EVENT_CONSTRAINT(0x1f, 0xe), > UNCORE_EVENT_CONSTRAINT(0x21, 0x3), > UNCORE_EVENT_CONSTRAINT(0x23, 0x3), > UNCORE_EVENT_CONSTRAINT(0x31, 0x3),