>
> @@ -352,9 +384,13 @@ static int rapl_pmu_event_init(struct perf_event
> *event)
> u64 cfg = event->attr.config & RAPL_EVENT_MASK;
> int bit, ret = 0;
> struct rapl_pmu *rapl_pmu;
> + struct rapl_pmus *curr_rapl_pmus;
>
> /* only look at RAPL events */
>
_msrs array(one for per-core scope and one
> for
> package scope PMU), inside the rapl_model struct.
>
> Signed-off-by: Dhananjay Ugwekar
Reviewed-by: Zhang Rui
-rui
> ---
> arch/x86/events/rapl.c | 7 ++-
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> dif
iables.
>
> No functional change.
>
> Signed-off-by: Dhananjay Ugwekar
Reviewed-by: Zhang Rui
-rui
> ---
> Changes in v4:
> * Move some renaming code from patch 10 to here (Rui)
> ---
> arch/x86/events/rapl.c | 113 +--
> --
>
On Thu, 2024-07-11 at 10:24 +, Dhananjay Ugwekar wrote:
> Prep for per-core RAPL PMU addition.
>
> No functional change.
>
> Signed-off-by: Dhananjay Ugwekar
Reviewed-by: Zhang Rui
-rui
> ---
> arch/x86/events/rapl.c | 14 +-
> 1 file changed, 9 in
as well. The wrapper functions
> added
> below will make it easier to pass the corresponding args for both the
> PMUs.
>
> No functional change.
>
> Signed-off-by: Dhananjay Ugwekar
Reviewed-by: Zhang Rui
-rui
> ---
> arch/x86/events/rapl.c | 30 +
> @@ -710,6 +710,9 @@ static int __init init_rapl_pmus(void)
> rapl_pmus = kzalloc(struct_size(rapl_pmus, rapl_pmu,
> nr_rapl_pmu), GFP_KERNEL);
> if (!rapl_pmus)
> return -ENOMEM;
> +
> + if (!alloc_cpumask_var(&rapl_pmus->cpumask, GFP_KERNEL))
> +
a global variable, to avoid calling
> x86_match_cpu() multiple times.
>
> No functional change.
>
> Signed-off-by: Dhananjay Ugwekar
Reviewed-by: Zhang Rui
-rui
> ---
> arch/x86/events/rapl.c | 16
> 1 file changed, 8 insertions(+), 8 deletions(-)
&
mu, which leads to situations in code like pmu->pmu,
> which is needlessly confusing. Above scenario is replaced with
> much more readable rapl_pmu->pmu with this change.
>
> Also rename "pmus" member in rapl_pmus struct, for same reason.
>
> No functional change.
>
On Thu, 2024-07-11 at 10:24 +, Dhananjay Ugwekar wrote:
> After commit ("x86/cpu/topology: Add support for the AMD 0x8026
> leaf"),
> on AMD processors that support extended CPUID leaf 0x8026, the
> topology_die_cpumask() and topology_logical_die_id() macros, no
> longer
> return the pa
Hi, Peter,
On Fri, 2024-07-05 at 11:24 +0200, Peter Zijlstra wrote:
> On Fri, Jul 05, 2024 at 02:18:30AM +0000, Zhang, Rui wrote:
>
> > > > > I have a doubt about this, won't the future Intel multi-die
> > > > > systems
> > > > &
On Wed, 2024-07-03 at 12:01 +0530, Dhananjay Ugwekar wrote:
> Hi Rui,
>
> On 7/3/2024 9:37 AM, Zhang, Rui wrote:
> > On Tue, 2024-07-02 at 15:50 +0530, Dhananjay Ugwekar wrote:
> > >
> > > >
> > > > For Intel products, we have
> > > >
On Tue, 2024-07-02 at 15:50 +0530, Dhananjay Ugwekar wrote:
>
> >
> > For Intel products, we have
> > 1. Casecadelake-AP which has multi-die per package and has per-die
> > RAPL
> > MSRs
> > 2. all other platforms which has single-die per package, so its
> > RAPL
> > MSRs can be considered as eit
On Mon, 2024-07-01 at 15:08 +0200, Peter Zijlstra wrote:
> On Mon, Jun 24, 2024 at 05:59:05AM +, Dhananjay Ugwekar wrote:
> > Prep for addition of power_per_core PMU to handle core scope energy
> > consumption for AMD CPUs.
> >
> > Replace the generic names with *_pkg*, to differentiate betwee
Hi, Dhananjay
>
> >
> > [...]
> >
> > > @@ -685,6 +774,13 @@ static void __init rapl_advertise(void)
> > > rapl_pkg_domain_names[i],
> > > rapl_hw_unit[i]);
> > > }
> > > }
> > > +
> > > + for (i = 0; i < NR_RAPL_CORE_DOMAINS; i++) {
> @@ -131,8 +146,10 @@ enum rapl_unit_quirk {
> };
>
> struct rapl_model {
> - struct perf_msr *rapl_msrs;
> + struct perf_msr *rapl_pkg_msrs;
IMO, this should be part of patch 8/10.
[...]
> @@ -685,6 +774,13 @@ static void __init rapl_advertise(void)
>
nfo is saved in an array.
> Introduce topology_logical_core_id() to derive a
> unique core ID across the system.
>
> Signed-off-by: K Prateek Nayak
> Signed-off-by: Dhananjay Ugwekar
Reviewed-by: Zhang Rui
thanks,
rui
> ---
> Documentation/arch/x86/topology.rst
On Mon, 2024-06-24 at 05:58 +, Dhananjay Ugwekar wrote:
> After commit ("x86/cpu/topology: Add support for the AMD 0x8026
> leaf"),
> on AMD processors that support extended CPUID leaf 0x8026, the
> topology_die_cpumask() and topology_logical_die_id() macros, no
> longer
> return the pa
> @@ -345,9 +353,14 @@ static int rapl_pmu_event_init(struct perf_event
> *event)
> u64 cfg = event->attr.config & RAPL_EVENT_MASK;
> int bit, ret = 0;
> struct rapl_pmu *rapl_pmu;
> + struct rapl_pmus *curr_rapl_pmus;
>
> /* only look at RAPL events */
> -
On Mon, 2024-06-10 at 10:07 +, Dhananjay Ugwekar wrote:
> Rename struct rapl_pmu variables from "pmu" to "rapl_pmu", to
> avoid any confusion between the variables of two different
> structs pmu and rapl_pmu.
> As rapl_pmu also contains a pointer to
> struct pmu, which leads to situations in c
ollecting the event for all the
> CPUs in
> the package.
>
> After:
> $ cat /sys/devices/power/cpumask
> 0
>
> Signed-off-by: Dhananjay Ugwekar
> Fixes: 63edbaa48a57 ("x86/cpu/topology: Add support for the AMD
> 0x8026 leaf")
Reviewed-by: Zhang Rui
20 matches
Mail list logo