Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2357294yba; Mon, 6 May 2019 04:49:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyY1CFhFyo9qO9KpFsLmT1sYrLjLp0JhUVGwkWhgRn0p+v6hCe65Blkr8xE9kE0JXqYyOa1 X-Received: by 2002:a63:d512:: with SMTP id c18mr32117128pgg.252.1557143376192; Mon, 06 May 2019 04:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557143376; cv=none; d=google.com; s=arc-20160816; b=T6qIEBJs/L6ZVQ6LhA1GOgqCxmxgtOFrKXuL4biCDzlaWJsDX9T9RJqtK+941YmUBH p8il2MLWrQ30z6uJo+x5Ms6N5UJqp79eYHZLe1TZZbBweuyfn1joAhYv7Epdsn3m2c6J UNYUBW6HInVaKuwUVxLg2dVXzEEu5oBNnbAgs7nZ0KMcMatX2V+fvKyHsr1JgAJX/jI6 xrStik4QAqjNS1GGnUem54k685ERivsFZXZyl7JZTt/fqO5GnC2SpH1qP0tcphqlI9O0 N81Pp/M75W44xE0CByYfWBkUuGrxRyRZeqMf+LrcI5+aYq7f2aCTh8K9Rvlrti+vjkrN 0UwA== 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=mAbU8LSqh6zDbO18wbVoxIfvmSATOQLHMqf1N6PtQVg=; b=iJkE38TTsvaue6A45X+xiX/lChdhMhvFKC3ASNrFXLkp0O5fQgYnoB2p0mc3bPChC+ YRLLjYkn9tYedVOv155cNYK6t5l9KzratPPFquE5GO2USphJmxOVybbC0QPBRdMl/uXe hbuJSQFkmhFrp52UtQ5uOOzYyy2feExz9xxgH7xTN+XJW0jtKpPVELtOtPfx55HsjNdV B665e9Ni0YlpSVWxJbV6gDbDG7u+TaQkJhd3e/A9ZuuHqa/0W3LX9T4lnUMca9YecwVN CVgCsJFsULLptQFtyTsZFvB+6k21gufLOjWZMnKOSNv/dOSWFcjkhdStyhW6yDlc7PWk HCEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=anNeeC7x; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1si16153571pln.52.2019.05.06.04.49.20; Mon, 06 May 2019 04:49:36 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=anNeeC7x; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726150AbfEFLsY (ORCPT + 99 others); Mon, 6 May 2019 07:48:24 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:50358 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbfEFLsY (ORCPT ); Mon, 6 May 2019 07:48:24 -0400 Received: by mail-wm1-f67.google.com with SMTP id p21so15346895wmc.0 for ; Mon, 06 May 2019 04:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mAbU8LSqh6zDbO18wbVoxIfvmSATOQLHMqf1N6PtQVg=; b=anNeeC7xzdIHcLWm+FwD4psWMlVdLxLRqYk5qXCvbvy3sNoyHWzQEZm0gsecXWVXQ1 iM2qWfn+oLpRReGynxhb91lPal7BZRqVhKvs8tga4ojeQuQfDFG1Xs7iFX8Jlg/H6A9k Pulaw9iJ2p9zIRv8mJTAVoKUyjvZMBTnoASUI2ZjwG1WkzP6H5f+O676W3/nROXLidKH TgCCzNC2YFNLWBexHHEvj2vRrl5wIRdY6tXTbVD7Zk1UBlcxEnZdqsrDOQOJQ5PiCnFT YMvW4+Yv8tvKNTKaCajBUf4vTc0KI6/BxHUi8i6T1yvCfmw9Cdds4jOBHjhz6i6DhYWV BIZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=mAbU8LSqh6zDbO18wbVoxIfvmSATOQLHMqf1N6PtQVg=; b=E7d9VuHarVgunavCT/h+7f5/JySn9nq6UHfJXjfL2SxrufFBYWhiXqxsM7h9a7vE1s mi0EjNU4IsE63pdjLrQy9XNOrPPKpkoDFZ+o9mZHWcXK4VX5iO8MwKtzojVvuImAtjnL 6mVFXLsn6WS4I/VDoJz5svIbplf4UnMk9j0CCyHWC+H2a1sIL2wF6OBtzRWIDsZkKO1g OkRKI7ZXrZl6yhMZDI9peb8sBSkvcj151mIdXnxNsAXU6L+O7NOMK2OullMdSZG4O5qh XmkxFQRXAjb9gmrSwtrQ041Sbo5KO5WrwsR6yfwx4C/ZLFW/LyXOuJ+oW+mje+812Ddd 8Qzg== X-Gm-Message-State: APjAAAXRSUmXpaekFu/mWdyDDA3sqUQjIjqCBH6t9zqiRYkOxYjVosQ2 TQ/paxX+tSsusY4Lmgcw8qw= X-Received: by 2002:a1c:304:: with SMTP id 4mr13947202wmd.39.1557143302586; Mon, 06 May 2019 04:48:22 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id y4sm8053826wmj.20.2019.05.06.04.48.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 May 2019 04:48:21 -0700 (PDT) Date: Mon, 6 May 2019 13:48:19 +0200 From: Ingo Molnar To: Len Brown Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Kan Liang , Peter Zijlstra , Len Brown , Thomas Gleixner Subject: Re: [PATCH 17/18] perf/x86/intel/rapl: Support multi-die/package Message-ID: <20190506114819.GA24079@gmail.com> References: <6f53f0e494d743c79e18f6e3a98085711e6ddd0c.1556657368.git.len.brown@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 * Len Brown wrote: > > static inline struct rapl_pmu *cpu_to_rapl_pmu(unsigned int cpu) > { > - unsigned int pkgid = topology_logical_package_id(cpu); > + unsigned int pkgid = topology_logical_die_id(cpu); Yeah, I think Peter pointed this out before: why is the local variable still named 'pkg' when we now have a die ID? The other patches have such problems too: when new facilities are introduced and used then function names and variable names need to be harmonized. Makes for rather confusing code otherwise, which invites bugs down the road. There's many such instances left in this series, please review the whole patchset for such problems. Thanks, Ingo