Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1387290ybl; Fri, 30 Aug 2019 17:32:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxb4OGRGMVj/hu8vEdZCv9g7WMWGXLuELXynRCJfo7nLv2p7BFKbVW4t3o7Q0rAReDuCPzL X-Received: by 2002:a17:90a:de16:: with SMTP id m22mr1181811pjv.40.1567211537840; Fri, 30 Aug 2019 17:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567211537; cv=none; d=google.com; s=arc-20160816; b=RTccJeSLdUyS7icTlFlohnfFsqxJbpt/hufxSdgvist0Sveh3dQ90vXa+0aklJt0wf Qmwv79q8rwTyc9YpzWIxbDM2+m0WRXGS1U8wGbhZKMk1W0Ce7JyihVjEQQQoF/fuX351 PAAoWXMHyEcAWT0dxbk4ZD0VOGzp1dbldYpSNJdBRzKbDve/tH2LpV/lUu2OE7/oVkPo GnKWR0GP5nnBvOe20T4AjQeyWjZPmXg5LcAUzG2TAaBv8UbHnFdgbz/yKL07Q7XYseXu /HenjQq6awXbbp4QHXJBOyKKc+8obvWT16KiuN0WPN1TbNVG1y8RMqaVnIzNME4dniVO FrUQ== 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; bh=xICqzK5qDWp1G4XyyfT+PJAfaq04QuC24Rk78Jw/2SI=; b=rd/BLzK0uud0SypEZB2iCSlrD97akLrmNn9hpbY/4nO5Dvi0u/D52+p9TKoqQN1Iaq lccOZv4I8OuE8wwl48Uct0KbhaXj22w6Wkc/Xa4AO4ON/Ow7qElIwAdNGvjfB5iAgvcR JlFcmFJem2pavYQumwfsOIZJ03RID+lUqacOdFywxoFjhOBSgRYe96QOv3Hdfq0RI8La R9/PkQ4NX1k7jktoZu8/PYC+uwua5egxs08t/u9cQhT/p5lOMwkBwbgLErnE/pIZOOdM CDBFgqxBbREGTKykIfJL1aVfMaN8vQ5jpW3CcUjaPXC9JUOWlwtVxQEB8f82TMoYzDIW seFA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22si5485253pgh.190.2019.08.30.17.32.01; Fri, 30 Aug 2019 17:32:17 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728485AbfHaAbL (ORCPT + 99 others); Fri, 30 Aug 2019 20:31:11 -0400 Received: from mga12.intel.com ([192.55.52.136]:9288 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728416AbfHaAbK (ORCPT ); Fri, 30 Aug 2019 20:31:10 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2019 17:31:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,449,1559545200"; d="scan'208";a="333022808" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by orsmga004.jf.intel.com with ESMTP; 30 Aug 2019 17:31:10 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 11D68300FFA; Fri, 30 Aug 2019 17:31:10 -0700 (PDT) Date: Fri, 30 Aug 2019 17:31:10 -0700 From: Andi Kleen To: Stephane Eranian Cc: "Liang, Kan" , Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , LKML , Thomas Gleixner , Jiri Olsa , Alexander Shishkin Subject: Re: [RESEND PATCH V3 3/8] perf/x86/intel: Support hardware TopDown metrics Message-ID: <20190831003110.GA5447@tassilo.jf.intel.com> References: <20190826144740.10163-1-kan.liang@linux.intel.com> <20190826144740.10163-4-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > the same manner. It would greatly simplify the kernel implementation. I tried that originally. It was actually more complicated. You can't really do deltas on raw metrics, and a lot of the perf infrastructure is built around deltas. To do the regular reset and not lose precision over time internally you have to keep expanded counters anyways. And if you do that you can just expose them to user space too, and have everything in user space just work without any changes (except for the final output) -Andi