From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932563AbeASSBH (ORCPT ); Fri, 19 Jan 2018 13:01:07 -0500 Received: from mga09.intel.com ([134.134.136.24]:20996 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932166AbeASSA7 (ORCPT ); Fri, 19 Jan 2018 13:00:59 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,382,1511856000"; d="scan'208";a="196980003" From: "Liang, Kan" To: Stephane Eranian CC: Peter Zijlstra , "tglx@linutronix.de" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "acme@kernel.org" , "ak@linux.intel.com" Subject: RE: [PATCH V5 4/8] perf/x86/intel/uncore: add new data structures for free running counters Thread-Topic: [PATCH V5 4/8] perf/x86/intel/uncore: add new data structures for free running counters Thread-Index: AQHTjjLMO5E6Fi0JBEaHVwBOA31k86N5HycAgACap6CAAPCdgIAApDaA//+iMICAAI7aIP//eyCAgACGgNA= Date: Fri, 19 Jan 2018 18:00:56 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F07753802712@SHSMSX103.ccr.corp.intel.com> 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> <20180119171929.GZ2228@hirez.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F077538026F3@SHSMSX103.ccr.corp.intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDdjZWZhMzEtMjMxNC00ODBhLTg2YzAtMmVmNTQ4ZWU3NTE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjJUcFpTcDBvRCtCMHFHdjlWVnp6eTFmQ2NsWXNWUEZuZWxJRW9RR251NXc9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id w0JI1AvU025817 > On Fri, Jan 19, 2018 at 9:53 AM, Liang, Kan wrote: > >> 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. > > > > OK. I will check if there are the exact same events on GPs for those > > free running counters. > > > You can measure the bandwidth and utilization on the GP. I am doing it all > the time. Oh, think a bit more. I think we cannot do the same thing as we did for CPU PMU's fixed counters. The counters here are free running counters. They cannot be start/stop. Thanks, Kan > > > Thanks, > > Kan > > > >> > >> That's what we do for the CPU PMU's fixed counters too. > >> > >> Don't invent magic event codes just because.