Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2422919yba; Sun, 7 Apr 2019 18:36:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy9tIWc1VCD5r0WGlBI4sPT/AVsRRyegzL99ufH4fbdV3zBrL4+ZkhTyPImAfmTlqZs08X X-Received: by 2002:a62:6f47:: with SMTP id k68mr10788715pfc.196.1554687403136; Sun, 07 Apr 2019 18:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554687403; cv=none; d=google.com; s=arc-20160816; b=FWGb920iqVdH83C3TXz8frDSiQYzzDbOYsGpvejPnShIO7eKMR0rb9SnBOkToOkU+S KOmappk8gqBv76jaAoSgSuevX/qEAPVFD8rFlr8Q9CZX88LBjWolIXRTMqYI3T78Lm7M UF9NH4qjewsepF836ECPytDIanZmwxB4NerNzvhRMYJNSkBTC6p4n9Esr4ryE8bQjnWO QW2zeuV1P0t1Y6ZfrWBDWqYNBB1JfrXDDyDGoYc4bSBTok/KGRRdTcnw/jy4Ua/soXsw o8DGJoPclCa1QsCHlsCfWQUiZgT4wQkGt1rGqBjA0y+OYbxB61ADh5Y5MvaXiC0kjncO 9oBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=P380VPcGsZqw3QgfCitkiDHkE0PNv3YbE4tcTT5MdQc=; b=Pt+CF0ijUhvod9imqxRiN8N3ttKVVgSPIxfHhmg44nxbOxXXsDOjB/EcHtCKbPkP7D ZR2PzMLTl+c0ZG0Yg/HDsHld/Gu19LqUJ+Z2UacwPjBGhcoibMsRofYRkXofoFdQbzQn B/Lfq8uo8sOnWY8ZGfLhCLAxlMV8JMdCS5sDSL0bxgC5+hhQ3vUWVSSo2DtH5NXfHEKq mo15qQm1d+vJu6r08WVa68ndYXVG4rMNByvj8EQBPjFUMiX7zn2tnQPEFSDbeud7rpew nuhY74DJnfydfCxEoCBM86ol+CY+vQmPs2if+1N4glLbP8VVXISKz6KofWNMQR7bJ+Mp oqlw== 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 n2si24779988pfa.129.2019.04.07.18.36.27; Sun, 07 Apr 2019 18:36:43 -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 S1726501AbfDHBfv (ORCPT + 99 others); Sun, 7 Apr 2019 21:35:51 -0400 Received: from mga03.intel.com ([134.134.136.65]:46163 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726456AbfDHBfv (ORCPT ); Sun, 7 Apr 2019 21:35:51 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2019 18:35:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,323,1549958400"; d="scan'208";a="335810638" Received: from lyang61-mobl3.ccr.corp.intel.com ([10.255.30.213]) by fmsmga005.fm.intel.com with ESMTP; 07 Apr 2019 18:35:48 -0700 Message-ID: <1554687347.2178.1.camel@intel.com> Subject: Re: [PATCH 08/14] powercap/intel_rapl: Support multi-die/package From: Zhang Rui To: Thomas Gleixner , Len Brown Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Len Brown , linux-pm@vger.kernel.org Date: Mon, 08 Apr 2019 09:35:47 +0800 In-Reply-To: References: <680e11fe0dcc65e4cfa5bfeaa0d1cdbe7896e3c0.1551160674.git.len.brown@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 五, 2019-04-05 at 20:27 +0200, Thomas Gleixner wrote: > On Tue, 26 Feb 2019, Len Brown wrote: > > > > > From: Zhang Rui > > > > On the new dual-die/package systems, the RAPL MSR becomes die- > > scope. > > Thus instead of one powercap device per physical package, now there > > should be one powercap device for each unique die on these systems. > > > > This patch introduces intel_rapl driver support for new > > dual-die/package systems. > This patch .... See Documentation/processs/ > > and this sentence is not really helpful either. > > > > > On the hardwares that do not have multi-die, > > topology_logical_die_id() > > equals topology_physical_package_id(), thus there is no functional > > change. > Something like this: > > To support this the RAPL package domain has to be identified by the > die id > instead of the package id. On single die CPUs the die id is the same > as the > physical package id. > > Hmm? Yeah, sounds much better. Len, will you help me update the changelog or do you want me to send an updated version to you? thanks, rui > > > > > Signed-off-by: Zhang Rui > > Signed-off-by: Len Brown > > Acked-by: Rafael J. Wysocki > > Cc: linux-pm@vger.kernel.org > > --- > >  drivers/powercap/intel_rapl.c | 4 ++-- > >  1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/powercap/intel_rapl.c > > b/drivers/powercap/intel_rapl.c > > index 6057d9695fed..8723e9ae7436 100644 > > --- a/drivers/powercap/intel_rapl.c > > +++ b/drivers/powercap/intel_rapl.c > > @@ -266,7 +266,7 @@ static struct rapl_domain > > *platform_rapl_domain; /* Platform (PSys) domain */ > >  /* caller to ensure CPU hotplug lock is held */ > >  static struct rapl_package *rapl_find_package(int cpu) > >  { > > - int id = topology_physical_package_id(cpu); > > + int id = topology_logical_die_id(cpu); > >   struct rapl_package *rp; > >   > >   list_for_each_entry(rp, &rapl_packages, plist) { > > @@ -1457,7 +1457,7 @@ static void rapl_remove_package(struct > > rapl_package *rp) > >  /* called from CPU hotplug notifier, hotplug lock held */ > >  static struct rapl_package *rapl_add_package(int cpu) > >  { > > - int id = topology_physical_package_id(cpu); > > + int id = topology_logical_die_id(cpu); > >   struct rapl_package *rp; > >   int ret; > >