From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934204AbdBVTTQ (ORCPT ); Wed, 22 Feb 2017 14:19:16 -0500 Received: from mga03.intel.com ([134.134.136.65]:44778 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933540AbdBVTTI (ORCPT ); Wed, 22 Feb 2017 14:19:08 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,195,1484035200"; d="scan'208";a="68393474" Date: Wed, 22 Feb 2017 11:18:48 -0800 From: Andi Kleen To: "Liang, Kan" Cc: Vince Weaver , Peter Zijlstra , "Odzioba, Lukasz" , Stephane Eranian , "mingo@redhat.com" , LKML , Alexander Shishkin Subject: Re: [PATCH] perf/x86: fix event counter update issue Message-ID: <20170222191848.GE1712@tassilo.jf.intel.com> References: <20161129092520.GB3092@twins.programming.kicks-ass.net> <20161129173055.GP3092@twins.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F07750CA4225@SHSMSX103.ccr.corp.intel.com> <20161129193201.GE3045@worktop.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F07750CA42A3@SHSMSX103.ccr.corp.intel.com> <20161205102509.GH3124@twins.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F077536A9963@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077536A9963@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > No. It related to the counter width. The number of bits we can use should be > 1 bit less than the total width. Otherwise, there will be problem. > For big cores such as haswell, broadwell, skylake, the counter width is 48 bit. > So we can only use 47 bits. > For Silvermont and KNL, the counter width is only 32 bit I think. So we can only > use 31 bits. It is 40 bits on these cores, so 39bits. -Andi