Received: by 10.223.176.46 with SMTP id f43csp1288135wra; Fri, 19 Jan 2018 09:21:52 -0800 (PST) X-Google-Smtp-Source: ACJfBougSWmCzGnTMk1ycZQUPwqjCqqt4x9EZ/3IUmtaqCAS1TqIarYXvdXKdsvZVlivfa/BvEH3 X-Received: by 10.101.97.67 with SMTP id o3mr14366786pgv.256.1516382512597; Fri, 19 Jan 2018 09:21:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516382512; cv=none; d=google.com; s=arc-20160816; b=j1/qhOLrwHsTj8B9XPQ5waO3UDmUAwrQT4rHRRd6DC6gtSjX/Z4AYP2kuUKikYmMEU 6otZgwleQFdzAgogDhB8HnB7GiWK65k/15f1t1xDq4D4uwv3I2r2/pRxpxSe8REk0yWf 32DPTv/dk72R85sil+M5sQ0Fn22RmRLGfkTRa7a6TmgGM/GXbrUOyxWe5CnL9k8SsJVl LMn7Emi5N144wMnwlckIv7KLa5g2fjWELmW3C4ezJYYv1AksJlnGru5Ou9/LruigZNQ3 wVVZ3i6h2+9vZ8WVpkaEoojfjJ4FXdTP0G/fpmhhWTET01AYnFaz7yipOBdWyqig3YqX N6VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ntsLzoOUZtqffeVvrbGjgYZR09UswEPUGkDHjf0Z/9U=; b=BjmU+lDp/YBKIO1UBA3S3v2CqdWfLyuHghHtIxn2jkHPcRa4PL0eqJ8XDJv+YQ0C1M cmsihdCzUP/P/aZzW/+Ev1LJTgqtbkDpD7f/gnx51lXXLRrQx1MkFBbTMlBRLGVaV+yI 4F/WnhD3HAfnr51DMBlhfMD690gBykKX8MdrcLdM9620ARFDhEK0zoRtJaVAu/jhp3dx r1hE4n4QWEUzlRWx2Vp5B9JGuE7Wq53k5uIULokPY4wtKzu/cjNmaV2qDPrdMbX0NemF q4ePLJr4Yi992TDBU7wuBKzbSxQY6Z4HE3jFqChXowG6LEOiRlrTGn8lEeWSIv/0YHn5 m3GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=gXsDk9B9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si8772385pgf.60.2018.01.19.09.21.38; Fri, 19 Jan 2018 09:21:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=gXsDk9B9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932499AbeASRTr (ORCPT + 99 others); Fri, 19 Jan 2018 12:19:47 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:53533 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932483AbeASRTe (ORCPT ); Fri, 19 Jan 2018 12:19:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ntsLzoOUZtqffeVvrbGjgYZR09UswEPUGkDHjf0Z/9U=; b=gXsDk9B9bgWB43kYIM9maNJhL Xg4yfsAcXZll89n87rxhT5736aJRK0t7XJzY3JM4tzQCBBXaYLLFNJ3k/OvMTuyI3U1lrkD78ckSZ 41QqUBy+xjs8fuxg9bCbBTacoXeQrDRnivhTE7gtqnVUrZhJ17XTfwb+OkVhooljNAtoE6ujMQsOY 5hYRLzq2hTl3uFa+Bfu+629BYItVBRp4YAxXJSMutLrYfqmT4zjQk0VTRE8fRIOB7djr5LwNIOjy3 v0y1oDvoPfem8l9+hCbw1PWFmsuLgfI4eatZwJAKM/qVBCu+StbTxKKvlRd2ztE9kalH1fULK/Lyp Yf1+pLpyw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ecaKB-0000NK-Gx; Fri, 19 Jan 2018 17:19:31 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C4D8C2029F9F9; Fri, 19 Jan 2018 18:19:29 +0100 (CET) Date: Fri, 19 Jan 2018 18:19:29 +0100 From: Peter Zijlstra To: "Liang, Kan" Cc: "tglx@linutronix.de" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "acme@kernel.org" , "eranian@google.com" , "ak@linux.intel.com" Subject: Re: [PATCH V5 4/8] perf/x86/intel/uncore: add new data structures for free running counters Message-ID: <20180119171929.GZ2228@hirez.programming.kicks-ass.net> References: <1516042629-387021-1-git-send-email-kan.liang@intel.com> <1516042629-387021-4-git-send-email-kan.liang@intel.com> <20180118133248.GC2249@hirez.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F07753801FEF@SHSMSX103.ccr.corp.intel.com> <20180119130731.GQ2228@hirez.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F077538025E7@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077538025E7@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 19, 2018 at 03:15:00PM +0000, Liang, Kan wrote: > > > > On Thu, Jan 18, 2018 at 05:43:10PM +0000, Liang, Kan wrote: > > > In the uncore document, there is no event-code assigned to free running > > counters. > > > Some events need to be defined to indicate the free running counters. > > > The events are encoded as event-code + umask-code. > > > > > > The event-code for all free running counters is 0xff, which is the > > > same as the fixed counters. > > > > Is it possible to count the same things using the generic counters? > > > > Yes, there are events for generic counters to count bandwidth and > utilization. > > The reasons of introducing free running counters are > - To provide highly valuable information (bandwidth and utilization) > which most of the customers are interested in > - To save on the precious generic counters _IF_ the exact same counters are available on the GPs then we must use the same event code for them and use event scheduling to place them on fixed/free-running counters when possible. That's what we do for the CPU PMU's fixed counters too. Don't invent magic event codes just because.