linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: X86 ML <x86@kernel.org>,
	linux-kernel@vger.kernel.org, Zhang Rui <rui.zhang@intel.com>,
	Len Brown <len.brown@intel.com>,
	Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH 10/22] powercap/intel_rapl: Support multi-die/package
Date: Wed, 8 May 2019 15:45:24 -0400	[thread overview]
Message-ID: <CAJvTdKndWcuq+hbJS+ksnUeqqzt-tgXxUYikgLqWeUYG1PuuRA@mail.gmail.com> (raw)
In-Reply-To: <20190507121459.GL2623@hirez.programming.kicks-ass.net>

On Tue, May 7, 2019 at 8:15 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Mon, May 06, 2019 at 05:26:05PM -0400, Len Brown wrote:
> > From: Zhang Rui <rui.zhang@intel.com>
> >
> > RAPL "package" domains are actually implemented in hardware per-die.
> > Thus, the new multi-die/package systems have mulitple domains
> > within each physical package.
> >
> > Update the intel_rapl driver to be "die aware" -- exporting multiple
> > domains within a single package, when present.
> > No change on single die/package systems.
> >
> > Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> > Signed-off-by: Len Brown <len.brown@intel.com>
> > Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 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 3c3c0c23180b..9202dbcef96d 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_domain(int cpu)
> >  {
> > -     int id = topology_physical_package_id(cpu);
> > +     int id = topology_logical_die_id(cpu);
> >       struct rapl_package *rp;

> Both functions are still misnomers. rapl_find_package_domain() does in
> fact now do rapl_find_die_domain(), right? Same for rapl_add_package()

A "RAPL Package Domain" (rapl_package, above) is a known proper noun --
it is a known documented capability.

When there could be just 1 die in a package, the name of this capability
also always matched the scope of a physical package.

Now that some products have two die in the same package, there
can be two of these inside a package, and they are associated with
each die.

There are no plans to re-name the Package RAPL Domain capability
in the hardware documentation.

Similarly, there are no plans to re-name any of the other "PACKAGE"
scoped MSRs to have "DIE" in their name instead.  The ship with
those names sailed long ago.

I think the code above reflects its function, and that somebody maintaining
it will be clear on this.  That is important, because in the future, there will
be a concept of PACKAGE scoped MSRs that span multiple DIE...

cheers,
Len Brown, Intel Open Source Technology Center

  reply	other threads:[~2019-05-08 19:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 21:25 [PATCH 0/22] v5 multi-die/package topology support Len Brown
2019-05-06 21:25 ` [PATCH 01/22] x86 topology: Fix doc typo Len Brown
2019-05-06 21:25   ` [PATCH 02/22] topology: Simplify cputopology.txt formatting and wording Len Brown
2019-05-06 21:25   ` [PATCH 03/22] x86 smpboot: Rename match_die() to match_pkg() Len Brown
2019-05-06 21:25   ` [PATCH 04/22] x86 topology: Add CPUID.1F multi-die/package support Len Brown
2019-05-06 21:26   ` [PATCH 05/22] x86 topology: Create topology_max_die_per_package() Len Brown
2019-05-06 21:26   ` [PATCH 06/22] cpu topology: Export die_id Len Brown
2019-05-06 21:26   ` [PATCH 07/22] x86 topology: Define topology_die_id() Len Brown
2019-05-06 21:26   ` [PATCH 08/22] x86 topology: Define topology_logical_die_id() Len Brown
2019-05-06 21:26   ` [PATCH 09/22] powercap/intel_rapl: Simplify rapl_find_package() Len Brown
2019-05-06 21:26   ` [PATCH 10/22] powercap/intel_rapl: Support multi-die/package Len Brown
2019-05-07 12:14     ` Peter Zijlstra
2019-05-08 19:45       ` Len Brown [this message]
2019-05-06 21:26   ` [PATCH 11/22] thermal/x86_pkg_temp_thermal: " Len Brown
2019-05-06 21:26   ` [PATCH 12/22] powercap/intel_rapl: update rapl domain name and debug messages Len Brown
2019-05-06 21:26   ` [PATCH 13/22] hwmon/coretemp: Support multi-die/package Len Brown
2019-05-06 21:26   ` [PATCH 14/22] topology: Create package_cpus sysfs attribute Len Brown
2019-05-06 21:26   ` [PATCH 15/22] topology: Create core_cpus and die_cpus sysfs attributes Len Brown
2019-05-06 21:26   ` [PATCH 16/22] perf/x86/intel/uncore: Support multi-die/package Len Brown
2019-05-07 12:21     ` Peter Zijlstra
2019-05-08 19:51       ` Len Brown
2019-05-07 12:22     ` Peter Zijlstra
2019-05-08 19:51       ` Len Brown
2019-05-06 21:26   ` [PATCH 17/22] perf/x86/intel/rapl: " Len Brown
2019-05-06 21:26   ` [PATCH 18/22] perf/x86/intel/cstate: " Len Brown
2019-05-06 21:26   ` [PATCH 19/22] thermal/x86_pkg_temp_thermal: rename internal variables to zones from packages Len Brown
2019-05-06 21:26   ` [PATCH 20/22] hwmon/coretemp: " Len Brown
2019-05-06 21:26   ` [PATCH 21/22] perf/x86/intel/uncore: renames in response to multi-die/pkg support Len Brown
2019-05-09 15:02     ` Liang, Kan
2019-05-13 17:30       ` Len Brown
2019-05-06 21:26   ` [PATCH 22/22] perf/x86/intel/rapl: rename internal variables " Len Brown
2019-05-09 15:04     ` Liang, Kan
2019-05-13 17:29       ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJvTdKndWcuq+hbJS+ksnUeqqzt-tgXxUYikgLqWeUYG1PuuRA@mail.gmail.com \
    --to=lenb@kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rui.zhang@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).