Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1562017pxb; Thu, 4 Feb 2021 16:55:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4qyqJMyPwSF9gl4HXnmA7qIL+zc1HClg61JFDvr95PBTDRsopMowj8uyFK4bO+fqxu7xO X-Received: by 2002:a17:906:f6c7:: with SMTP id jo7mr1725485ejb.178.1612486508751; Thu, 04 Feb 2021 16:55:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612486508; cv=none; d=google.com; s=arc-20160816; b=JW7i01fMvGzoJVkeqegaqJAxwXTdk+N1InM8y45jxxW7zf1/SSrHK7rnh9ioakJQRg AIjrqpVmaAlR0LYD1XI+GopOwtGNoLm1IBDrekWvzVhTkfHyWhoUgFLSA0CboDfLE0fN EBseu8Tq/mdtienr65we2YdqlTjo8UkERSQAzQ6osgnS3C0eKyELeGd4kEyaitbkIYeN AhGS5n5yhM6QoXluPyAE9+KaHoYgIalmM3lIIjGFhPBWOTDLEd8sPIKS3S1GCnXp5No8 HE0EyV3GVj8MC3yEMQwt9XBilwEOwG6x4Weezv3zfQ1Ll3BpfF1NXi1b0nGy20vXQK6f Jz8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :ironport-sdr:ironport-sdr; bh=C+DjN5hUCxb6UOoCMXHyovIe5jT6iPmh7l5m4buzPfQ=; b=Y1y26OAo14IcmnIyAJ56UUkFFj4OXv9RPZkV6rzplkvUV8/xGk7Trf2VNtny6b5Zlc jyUvSfJLNHqCTcIU0xNwcx20Fs3PhnD255XUiB81aVC2XE3Ob+JVc6KZKfHP7aHMT63Z OLCtqvoxtF0SCzuFB6HLSF6cscMxtin6kR0t97bJGXFYlLx2Aa89iGHI2XHJL5nGRNcJ DBoGZz+17Y3y/g9Eoymw+y4/S9Gn7yrgN4jcW7j564wnrmpNxPQPv/RpOQAszAszsFuc BHxjpW8QXz9qKCo1ZQ/xvDZFLkIr69cYbmtluJ3yiXZTD7h0Jr0XDQ+xfNNVpKmjADkq 8vbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id va26si4153184ejb.431.2021.02.04.16.54.44; Thu, 04 Feb 2021 16:55:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237771AbhBDQHD (ORCPT + 99 others); Thu, 4 Feb 2021 11:07:03 -0500 Received: from mga07.intel.com ([134.134.136.100]:2815 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237709AbhBDQFP (ORCPT ); Thu, 4 Feb 2021 11:05:15 -0500 IronPort-SDR: 5YyjVe+a0W1Gv/PZNsp/ioUQwdf2LUgNBykqZYtDGHzVe0Z53qdUANcTPyOaVdphc32kIaYy5n vBzYO91rqIYg== X-IronPort-AV: E=McAfee;i="6000,8403,9885"; a="245339446" X-IronPort-AV: E=Sophos;i="5.79,401,1602572400"; d="scan'208";a="245339446" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 08:04:31 -0800 IronPort-SDR: jFu/b9xE0nNDZadsgL3rNRAQkJYq5wt30uuBlG9f+S7rZIwAGMoYvrkatYzGhhPE2ghOZdQBjM eJCXA8r6StaQ== X-IronPort-AV: E=Sophos;i="5.79,401,1602572400"; d="scan'208";a="415415716" Received: from clai1-mobl.ccr.corp.intel.com ([10.249.171.226]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 08:04:27 -0800 Message-ID: <45cbb7f18765cf7365e5eaa1358727201fc1f4bf.camel@intel.com> Subject: Re: [PATCH 3/3] perf/x86/rapl: Fix psys-energy event on Intel SPR platform From: Zhang Rui To: Peter Zijlstra Cc: "mingo@redhat.com" , "acme@kernel.org" , "mark.rutland@arm.com" , "alexander.shishkin@linux.intel.com" , "jolsa@redhat.com" , "namhyung@kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "kan.liang@linux.intel.com" , "ak@linux.intel.com" Date: Fri, 05 Feb 2021 00:04:25 +0800 In-Reply-To: References: <20210115092208.20866-1-rui.zhang@intel.com> <20210115092208.20866-3-rui.zhang@intel.com> <70b71922e7f84234be70c7104969331f@intel.com> <03e5815f89d749a18b47bdf986181f1f@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Peter, On Wed, 2021-02-03 at 15:47 +0100, Peter Zijlstra wrote: > FWIW, your email is malformed, please wrap at 78 chars. > > On Mon, Jan 25, 2021 at 06:11:14AM +0000, Zhang, Rui wrote: > > In short, the current code does not allow RAPL energy counter to > > return 0. And all the work I do is to allow Psys energy counter to > > return 0. > > Ok. > > > In this way, the Psys event is "valid" on all CPUs, so we don't > > need > > to handle the master thing. > > So RAPL is mapped to DIEs, and IIRC we can have multiple DIEs per > Package. But the master thing is a Package. > > Is this all moot because SPR has one DIE per Package? Oh, right. This is not a problem on SPR because it is a single-die platform. > Because if it > would have more, there's be more interesting problems I suppose. Agreed. thanks, rui