Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp695836ybl; Fri, 10 Jan 2020 05:19:06 -0800 (PST) X-Google-Smtp-Source: APXvYqxGTcAgrtHrIjm7SQUX8aCjXPswPdHHc+N+pv1abdbS0djP6Nk2KBooE47BD4EWBZ7dgI8f X-Received: by 2002:a9d:6d10:: with SMTP id o16mr2657680otp.28.1578662346041; Fri, 10 Jan 2020 05:19:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578662346; cv=none; d=google.com; s=arc-20160816; b=jxx+SssuEmgEYT5LEUe/tj0aixn2IDC2LFjYc+zH3R9PU2RSP+wgFF7osypucFfCjw QgdN11dtqO/5UeSgN2nMIZ6we2dvG7t16BJFJScQUJlOtoydVlulbL2wezlQYwEp6kfY xji2bi+X9UloJhpokumKUXGoTztMcGL8NMUhzQ3qsSbumVGlh49p0o6HNxMRpp0O2AHe aajMYaOpB+k2v/MXAUpt+l3hE2w8r8L3ztBu+2MXoMkh7Lq0ht4c2eoRMWOaQqmn0BRr rTApEcg3GqQt46sUYLrxGLG1GKhMwEKzLCCnUma+14JwNV5q1mfxkH0OMCLWT7/qJtMK tf3g== 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; bh=GoJ/f0Fq70LSZhFTT9Pl1YpUrxt52JUe7bDNzMBe450=; b=Z6WQRs0MZM8LQhVe7W4woUp3D5UyghTeJ727gBhsrlGvIwP0+E0CISgdl35U7riPDy quCvWjhtEZuxoHF67803MrS05tCXymWHufCDLrOCWlkYvhm3au7YtkpnP1p9i4WwFFjb 7SjqTH5P2DERgpiz5h8lKIJOxwW1r8QZaGOzJ3V6Mb8+teHEciDmWMMrkEi2OKoE903H dlQavALr0XEB6SkeTaMRP+jQsbmcVUWPzByj/1bC7gPVs04mnuZsct9r067vCact+8Ol tRReINENTJ7avETzhG2R18Ii/FMwOaYv9KjY9SfYtNIdztbXEOp5F6McS62yqletPyqt g4yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=swL03vpB; 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 w26si1091540otl.213.2020.01.10.05.18.54; Fri, 10 Jan 2020 05:19:06 -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=swL03vpB; 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 S1727481AbgAJNR6 (ORCPT + 99 others); Fri, 10 Jan 2020 08:17:58 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:54622 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727347AbgAJNR6 (ORCPT ); Fri, 10 Jan 2020 08:17:58 -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=GoJ/f0Fq70LSZhFTT9Pl1YpUrxt52JUe7bDNzMBe450=; b=swL03vpBvw32P5Ma7x9MAisgA GZu9+2dX89NBDP8YjBDeD02MuHzYpeT1wSu8oESkWnSul0LV7Y0+DPNKZtgfIl7LFZrIohzG6OCzU jqZ2GXPo13e2lOIhr7q1mQhiUAl8b6RdC3Nr+qN3gv820wCKMCPCYkIKqNLulllfwleBhGzww4gSz +BQD6OjjwKLkC6gb3v29ke2qFyDNNfkeSwx3yxu2KZcRDDPu9L3m6iK5YyACEp3L1zQGUhEqBtl46 UedbXNOqEkenXIzh95VnKFADOgesTHCveRWDcfiiy3Z2lPBbmKY+8vz+ypxU4McIKxYhulZTsLyjl c0UMIIFOA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipuAi-0005rn-HY; Fri, 10 Jan 2020 13:17:52 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 115D630018B; Fri, 10 Jan 2020 14:16:16 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EE9852B612611; Fri, 10 Jan 2020 14:17:49 +0100 (CET) Date: Fri, 10 Jan 2020 14:17:49 +0100 From: Peter Zijlstra To: kan.liang@linux.intel.com Cc: acme@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, jolsa@kernel.org, eranian@google.com, alexander.shishkin@linux.intel.com, ak@linux.intel.com Subject: Re: [PATCH V5 RESEND 00/14] TopDown metrics support for Icelake Message-ID: <20200110131749.GD2827@hirez.programming.kicks-ass.net> References: <20200106202919.2943-1-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200106202919.2943-1-kan.liang@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 06, 2020 at 12:29:05PM -0800, kan.liang@linux.intel.com wrote: > From: Kan Liang > > Icelake has support for measuring the level 1 TopDown metrics > directly in hardware. This is implemented by an additional METRICS > register, and a new Fixed Counter 3 that measures pipeline SLOTS. > > New in Icelake > - Do not require generic counters. This allows to collect TopDown always > in addition to other events. > - Measuring TopDown per thread/process instead of only per core > > For the Ice Lake implementation of performance metrics, the values in > PERF_METRICS MSR are derived from fixed counter 3. Software should start > both registers, PERF_METRICS and fixed counter 3, from zero. > Additionally, software is recommended to periodically clear both > registers in order to maintain accurate measurements. The latter is > required for certain scenarios that involve sampling metrics at high > rates. Software should always write fixed counter 3 before write to > PERF_METRICS. Do we really have to support this trainwreck? This is such ill designed hardware, I'm loath to support it, it might encourage more such 'creative' things and we really don't need that.