Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp708298pxb; Sat, 16 Jan 2021 04:51:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzM/FfAlo1GwEX2WqZzfJefdAnNHnc8aOdwwnuh/wukNdVSkPZO/HlOEsfMZkwX0QN32zi8 X-Received: by 2002:a05:6402:312c:: with SMTP id dd12mr13547547edb.327.1610801478527; Sat, 16 Jan 2021 04:51:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610801478; cv=none; d=google.com; s=arc-20160816; b=YXWaYU3CU9+o6risciQ33rD1Bwe7++puxcTwYPJOzBVcVRazcG0r4RS2YqofCd//mg zrQxV7nZwW9DC4DxiuGAXfRvZnMK14z9HsFocL/W3oq9MHtkO1Y3nHKCMMDW21POMj9p xnjNTfgHlhF1Td2YMuPxdBDJuBO5bMA52UybGZSrDl0wu644/5vIcWGDFpRLxCEirKBF zJXZiIp3vVMWwl6A+N3dKC2AZJcRI0KnzkRsS0Vvp62fQsiVKtckB9jq/M3kwpHw16wB FjKgz0NiQLE1lwrpGU5Vrc5o/rpcm0t8kwrx01s84j48TUTDm+5p2VrmwI2wCoqVYOkP sAqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Fx62Z007nfHIGbl4rcsP9LfvQotUGJl9LmsZY3stC7U=; b=TmwqbKxWNXBUl1CfC45i7U7KxutcPKByMQfVrjI75Kgvjwm9BN2r3s5XaYf7VDyK+D Hv0/ILY9g+2jMlwHgUgaEMR7F3IPC86XQtGq0NFQsQ4qKd1N0XTD2lmsCFybA5UVkTXh jGgtBil/NmsmTGPGr/ZbGFfjaWcXipsf3V7iASuKlMvTzNNHiufv4aWp5j8LyenyNkp8 YeOK4MmpQUaHTP7+yiQk8g8ajH9VaGIrpsf+7YkZA0BW0pXpWxk/BfvNayMX0rYQBc39 V3DRgPGci7DKyghktUdCFw1lNd4y5LEHymtjaoB5nylwrTEqRo+ZO5Ouosdouodoe0X2 Cdjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=EBIABI1n; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id df21si5004448edb.207.2021.01.16.04.50.55; Sat, 16 Jan 2021 04:51:18 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=EBIABI1n; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726906AbhAPMtz (ORCPT + 99 others); Sat, 16 Jan 2021 07:49:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725979AbhAPMtw (ORCPT ); Sat, 16 Jan 2021 07:49:52 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 623D3C061793 for ; Sat, 16 Jan 2021 04:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=Fx62Z007nfHIGbl4rcsP9LfvQotUGJl9LmsZY3stC7U=; b=EBIABI1nI80lMi4cwmLZCfUMka h63IQat9ZDwT70MW2YMXOh5aEe/McyASu8vwcpOuCp4jd9vQGsd4cHqTm8Tfn24VqigjJ66qpZSeg DLUClalYrR4Lsjo8nwrffiPzwiuXYFmWtNv0rrTL7IXnQS74yvrUiKV47jSrrzabqtZLgu6vXmDMK YPxKoxCyZJKhd17esJJ4WzXpMb9H6dzaKwgc95tku+JssK3G7bbaLDiAxemyhBXMLZQgfixUTbz5U 9OMtOl2D3c0nYmKk2cwRqCNoxwl2nYNz6Eh2eRJz6WpJLhrv+6G3H2SXb73F5krwSGD8KUMEjk7n9 sxGHeJ2Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1l0l0G-00AGdF-4V; Sat, 16 Jan 2021 12:48:32 +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 43627300F7A; Sat, 16 Jan 2021 13:48:27 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2C5BE20299B4E; Sat, 16 Jan 2021 13:48:27 +0100 (CET) Date: Sat, 16 Jan 2021 13:48:27 +0100 From: Peter Zijlstra To: "Zhang, Rui" 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" Subject: Re: [PATCH 2/3] perf/x86/rapl: Fix energy counter detection Message-ID: References: <20210115092208.20866-1-rui.zhang@intel.com> <20210115092208.20866-2-rui.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 16, 2021 at 08:19:35AM +0000, Zhang, Rui wrote: > > > > -----Original Message----- > > From: Peter Zijlstra > > Sent: Saturday, January 16, 2021 4:03 AM > > To: Zhang, Rui > > 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 > > Subject: Re: [PATCH 2/3] perf/x86/rapl: Fix energy counter detection > > Importance: High > > > > On Fri, Jan 15, 2021 at 05:22:07PM +0800, Zhang Rui wrote: > > > In the RAPL ENERGY_COUNTER MSR, only the lower 32bits represent the > > > energy counter, and the higher 32bits are reserved. > > > > > > Add the MSR mask for these MSRs to fix a problem that the RAPL PMU > > > events are added erroneously when higher 32bits contain non-zero value. > > > > Why would these high bits be non-zero? > > On SPR platform, the high bits of Psys energy counter are reused for other purpose. > High bits for other RAPL domains energy counters still return 0. > > I didn't mention this because I thought this patch should be okay as a generic fix. But it doesn't fix anything.. there's not anything broken, except on that daft SPR thing.