Received: by 10.223.176.46 with SMTP id f43csp1328034wra; Fri, 19 Jan 2018 09:56:17 -0800 (PST) X-Google-Smtp-Source: ACJfBovyrneVJ1X7UK9EnGBhrwuImdHDx+GVM1bWEEVZBkSZI/zHHf7abOLPYWb1kL9OjYWMhGYa X-Received: by 10.101.101.68 with SMTP id a4mr16968682pgw.368.1516384577831; Fri, 19 Jan 2018 09:56:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516384577; cv=none; d=google.com; s=arc-20160816; b=qPFfn630HAeXiSSuz7JQVXrmUcWjiYOT/hOy/s3kqqyfUSVIGNbC+0lEps7zYdrbWY USudYywBp1RQg6f6TTdIyU9d3iT4Te/fIrVAQzqtUHnMwDU/UiaBUPqxVEEUsagIx7g6 YU/oBUKml3PimsKmd6sl6hGNWYTRZVlQkwON7l/JKXwGEH6BCW6xCzwwWmTENwpMs9cr wMP7NfSvtKhmqyslCKBwh3XeLNDJmBK3zON6i0sHJFpqOjcw1XxSSzWPuasAbegd4srt VBhnjdxz/HZv8aXMVLA3w2cIU8zKU4zhlXCqSKFQbk/m7iLZSieyG5+Ly+ovAemPQKc/ ckAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=D1SP73Hwvd0MxFFUyeK+9hFhh4WS6gwgFJKfrSC/1qA=; b=iXVldSgAq7nCDM/Qo4pBGbYgin0fO0eguHaHtfw3/DbCW/s/yzHQ+DM50A53kcc8Hr JrYAITFELoKFlOxZjRvCWfXhVJI7CU2Kxgc970lrOxdtgrkTVvsx5BPrbfjL4TOG5mfr ISCAGvUmT2rV6UAGEYTX3C51WWKMLUY74rHBWD4u3ppLFhtxoUpIB9w1v5vCFQM4Un6J Banq+3GnnhSMkh31f3JdWNvFNgVimDVr6SED+jOyp8BCwVxpEBkMVheuwhpRV9lxmo9F tgmSi4DdIKvSs2SaHv0qydh9SxOG7pNNMC0H4Szeovxykc8Aibx/EA09wHl+w2D8YQrZ wkbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fDZgi/KZ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e26si3658651pfj.239.2018.01.19.09.56.03; Fri, 19 Jan 2018 09:56:17 -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=pass header.i=@google.com header.s=20161025 header.b=fDZgi/KZ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756058AbeASRzS (ORCPT + 99 others); Fri, 19 Jan 2018 12:55:18 -0500 Received: from mail-io0-f176.google.com ([209.85.223.176]:38274 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755932AbeASRzN (ORCPT ); Fri, 19 Jan 2018 12:55:13 -0500 Received: by mail-io0-f176.google.com with SMTP id d11so3006699iog.5 for ; Fri, 19 Jan 2018 09:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=D1SP73Hwvd0MxFFUyeK+9hFhh4WS6gwgFJKfrSC/1qA=; b=fDZgi/KZ4a/8pW6gGTJFHA36+3oGB1qi22lRPdHrJ8wlkqYsairdH0pnc1oNNjdnSC 4goB1ymqNfYCVRkOv6w5qaKWrLdJKHhmPfagh8fu2r/vcEsenQjfvT+P/QkxxPT4H9wj NwaZH5S/SWk/YqKZN8V6/hL2I9aNo8WQBphXDg7T4rjpCHPVXMushsVufYct71+UKk0G dRg+31h0lEbEOYrohnnA661XFrr7pNIw+fxMW3EPZrm3ffQOFgP38u9LrqeqPN6NlB67 i0q9QKZAYVTVlQFD6TfMtoI4tCwnTqrzjt6muRCFpFCaIo3PtTVxcV8qRYpA383bwyE9 g2lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=D1SP73Hwvd0MxFFUyeK+9hFhh4WS6gwgFJKfrSC/1qA=; b=Zcie2+HO9qHnG2VCNoXEh/eJUQxYtLsu39I8TSjTLjxsXo0OpcrjIr3l5VIpWlfeoE pbft961rxUAWY/0M31rWUDvk5pvUvpWO8hm2Xc0tlBumdJlB1bf5SPYR10euSil+hPCq 8bCyRO625ClArXFW8+t/ORTSUO9HpFFU9x4Cu3GuMvzlo7Q+3I7sKbiPS+l0YvWn7SxW vYY2h9wrFgY68br6aFQoM2v76tKkJYmucpJmD7TssPfDrN1lfhmx3XwTQgZvG+ST/eW5 ucqSCPmXhgibtbD3AzHbpB4OpRyEnHXJskpb/zYb7sE+wACzzsKrOatI6stU/KYfAPz5 Cngw== X-Gm-Message-State: AKwxytd5H4Xk/0P9P3VL2Oj+TLhGsKglqkDHrrxqCcIT6TCwGd9bjPlx IIpkkjtQMAZx0HRPeAvyitq/lkvfl+D4t1LB6/ncJw== X-Received: by 10.107.8.148 with SMTP id h20mr22202283ioi.204.1516384512067; Fri, 19 Jan 2018 09:55:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.170.39 with HTTP; Fri, 19 Jan 2018 09:55:11 -0800 (PST) In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077538026F3@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> From: Stephane Eranian Date: Fri, 19 Jan 2018 09:55:11 -0800 Message-ID: Subject: Re: [PATCH V5 4/8] perf/x86/intel/uncore: add new data structures for free running counters To: "Liang, Kan" Cc: Peter Zijlstra , "tglx@linutronix.de" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "acme@kernel.org" , "ak@linux.intel.com" Content-Type: text/plain; charset="UTF-8" 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 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. > Thanks, > Kan > >> >> That's what we do for the CPU PMU's fixed counters too. >> >> Don't invent magic event codes just because.