Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932839AbcKHQWT convert rfc822-to-8bit (ORCPT ); Tue, 8 Nov 2016 11:22:19 -0500 Received: from mga07.intel.com ([134.134.136.100]:2064 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932466AbcKHQWR (ORCPT ); Tue, 8 Nov 2016 11:22:17 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,462,1473145200"; d="scan'208";a="1065670100" From: "Liang, Kan" To: Andi Kleen , Peter Zijlstra CC: Jiri Olsa , Vince Weaver , "Robert Richter" , lkml , Ingo Molnar Subject: RE: [PATCH] perf/x86: Fix overlap counter scheduling bug Thread-Topic: [PATCH] perf/x86: Fix overlap counter scheduling bug Thread-Index: AQHSOdIsiqKg0s6PyEOKEiPKy1JRqqDPPNCQ Date: Tue, 8 Nov 2016 16:22:13 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F07750C8D9D0@SHSMSX103.ccr.corp.intel.com> References: <1478015068-14052-1-git-send-email-jolsa@kernel.org> <20161108122039.GP3142@twins.programming.kicks-ass.net> <20161108150949.GM26852@two.firstfloor.org> In-Reply-To: <20161108150949.GM26852@two.firstfloor.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGM3ZjllMjMtYmNlNy00ZGMzLWJkOGYtZjljNzc1MDkwN2JiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ilp6VWRiU00rRzFjREdDbCs5UTl0MEU4K2VPQ1BVdElOd3hoWGNscDNTb0E9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 957 Lines: 32 > > > > > > 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 */ I think the crash is caused by the overlap bit. Why not just revert the previous patch? If overlap bit is removed, the perf_sched_save_state will never be touched. Why we have to reduce a counter? Thanks, Kan > > UNCORE_EVENT_CONSTRAINT(0x21, 0x3), > > UNCORE_EVENT_CONSTRAINT(0x23, 0x3), > > UNCORE_EVENT_CONSTRAINT(0x31, 0x3), > >