mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wyes Karny <wyes.karny@amd.com>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Stephane Eranian <eranian@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	hpa@zytor.com, x86@kernel.org, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org, gautham.shenoy@amd.com,
	ananth.narayan@amd.com,
	"kernel@collabora.com" <kernel@collabora.com>
Subject: Re: [PATCH] perf/x86/rapl: Enable Core RAPL for AMD
Date: Tue, 28 Feb 2023 21:25:14 +0530	[thread overview]
Message-ID: <Y/4j4q97NAKM6YfX@bhagirati.amd.com> (raw)
In-Reply-To: <803f7ef2-f217-65fe-d0b9-98ae469556fa@collabora.com>

Hi Muhammad,

On 28 Feb 19:20, Muhammad Usama Anjum wrote:
> On 2/21/23 1:50 PM, Stephane Eranian wrote:
> > Hi,
> > 
> > Testing Wyes' patch for energy-cores on Zen3 server loaded with triad
> > bench on socket0:
> > 
> > $ perf stat --per-core -a -C0-63 -I 1000 -e
> > power/energy-cores/,power/energy-pkg/
> > #           time core               cpus             counts   unit events
> >      1.001019203 S0-D0-C0              1               1.28 Joules
> > power/energy-cores/
> >      1.001019203 S0-D0-C0              1             231.38 Joules
> > power/energy-pkg/
> >      1.001019203 S0-D0-C1              1   4,294,967,130.96 Joules
> > power/energy-cores/
> >      1.001019203 S0-D0-C1              1             231.38 Joules
> > power/energy-pkg/
> >      1.001019203 S0-D0-C2              1   4,294,967,126.23 Joules
> > power/energy-cores/
> >      1.001019203 S0-D0-C2              1             231.38 Joules
> > power/energy-pkg/
> >      1.001019203 S0-D0-C3              1   4,294,967,122.50 Joules
> > power/energy-cores/
> >      1.001019203 S0-D0-C3              1             231.38 Joules
> > power/energy-pkg/
> >      1.001019203 S0-D0-C4              1   4,294,967,129.92 Joules
> > power/energy-cores/
> >      1.001019203 S0-D0-C4              1             231.38 Joules
> > power/energy-pkg/
> >      1.001019203 S0-D0-C5              1   4,294,967,121.49 Joules
> > power/energy-cores/
> >      1.001019203 S0-D0-C5              1             231.39 Joules
> > power/energy-pkg/
> > 
> > I think the result of energy-cores is not reliable and I think that is
> > why I did not
> > include it in the patch.
> > 
> > Could also be a problem with the kernel code, but I don't know why it would only
> > impact energy-cores given energy-pkg looks reasonable here.
> > 
> 
> I'm getting consistent per core energy measurements on AMD Custom APU 405.
> Probably consistency depends on the chip.
> 
> sudo perf stat -a --per-core -C 0-7 -e power/energy-cores/
> 
>  Performance counter stats for 'system wide':
> 
>  S0-D0-C0           2               0.51 Joules power/energy-cores/
>  S0-D0-C1           2               0.51 Joules power/energy-cores/
>  S0-D0-C2           2               0.51 Joules power/energy-cores/
>  S0-D0-C3           2               0.51 Joules power/energy-cores/
> 
> What is the fate of this patch now?

I'm working on the issue reported by Stephane. Will send v2 very soon.

Thanks,
Wyes
> 
> [..]
> 
> >>>> Stephane, this was an oversight?
> >>>>
> >>> I think it may depend on the CPU model. I remember it returning either
> >>> 0 or bogus values on my systems. They may have improved that.
> >>> The commit msg does not show which CPU model this is run on.
> >>
> >> I've tested this on Zen 2, 3 and 4 server systems.
> >>
> >> Thanks,
> >> Wyes
> 
> -- 
> BR,
> Muhammad Usama Anjum

  reply	other threads:[~2023-02-28 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 16:13 Wyes Karny
2023-02-19 11:52 ` Oleksandr Natalenko
2023-03-01 18:32   ` Wyes Karny
2023-02-20 11:45 ` Peter Zijlstra
2023-02-20 21:29   ` Stephane Eranian
2023-02-21  4:53     ` Wyes Karny
2023-02-21  8:50       ` Stephane Eranian
2023-02-28 14:20         ` Muhammad Usama Anjum
2023-02-28 15:55           ` Wyes Karny [this message]
2023-03-01 18:27         ` Wyes Karny

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=Y/4j4q97NAKM6YfX@bhagirati.amd.com \
    --to=wyes.karny@amd.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ananth.narayan@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=eranian@google.com \
    --cc=gautham.shenoy@amd.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=usama.anjum@collabora.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

all inboxes | Powered by JetHome®