Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753357AbcKHPJx (ORCPT ); Tue, 8 Nov 2016 10:09:53 -0500 Received: from one.firstfloor.org ([193.170.194.197]:32986 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752800AbcKHPJv (ORCPT ); Tue, 8 Nov 2016 10:09:51 -0500 Date: Tue, 8 Nov 2016 07:09:49 -0800 From: Andi Kleen To: Peter Zijlstra Cc: Jiri Olsa , Vince Weaver , Robert Richter , lkml , Ingo Molnar , Andi Kleen , kan.liang@intel.com Subject: Re: [PATCH] perf/x86: Fix overlap counter scheduling bug Message-ID: <20161108150949.GM26852@two.firstfloor.org> References: <1478015068-14052-1-git-send-email-jolsa@kernel.org> <20161108122039.GP3142@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161108122039.GP3142@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1018 Lines: 27 Adding Kan who actually maintains the uncore drivers these days. > Which is two distinct groups, only one of which has overlap. And the one > with overlap only has 2 overlapping masks, giving a max reties of 1. Looks reasonable to limit the mask. Are we sure this problem isn't in the other 0xc masks too ? -Andi > > > diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c > index 272427700d48..71bc348736bd 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, 0xc); /* should be 0x0e but that gives scheduling pain */ > UNCORE_EVENT_CONSTRAINT(0x21, 0x3), > UNCORE_EVENT_CONSTRAINT(0x23, 0x3), > UNCORE_EVENT_CONSTRAINT(0x31, 0x3), >