mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	mingo@elte.hu, ak@linux.intel.com, acme@redhat.com,
	jolsa@redhat.com, zheng.z.yan@intel.com, bp@alien8.de,
	vincent.weaver@maine.edu, maria.n.dimakopoulou@gmail.com
Subject: Re: [PATCH 2/2] perf/x86: add RAPL PP1 energy counter support
Date: Tue, 17 Dec 2013 11:42:51 +0100	[thread overview]
Message-ID: <20131217104251.GA27274@gmail.com> (raw)
In-Reply-To: <1387225224-27799-3-git-send-email-eranian@google.com>


Nice patch!

I noticed a couple of small details:

* Stephane Eranian <eranian@google.com> wrote:

> Add support for the RAPL energy counter PP1.
> 
> On client processors, it usually correspondss to the

s/correspondss
 /corresponds

> energy consumption of the builtin graphic card.
> 
> New event:
> - name: power/energy-gfx/
> - code: event=0x4
> - unit: 2^-32 Joules
> 
> On processors without graphics, this should count 0.
> The patch only enables this event on client processors.

>  EVENT_ATTR_STR(energy-cores, rapl_cores, "event=0x01");
>  EVENT_ATTR_STR(energy-pkg  , rapl_pkg, "event=0x02");
>  EVENT_ATTR_STR(energy-ram  , rapl_ram, "event=0x03");
> +EVENT_ATTR_STR(energy-gfx, rapl_gfx, "event=0x04");

>  EVENT_ATTR_STR(energy-cores.unit, rapl_cores_unit, "Joules");
>  EVENT_ATTR_STR(energy-pkg.unit  , rapl_pkg_unit, "Joules");
>  EVENT_ATTR_STR(energy-ram.unit  , rapl_ram_unit, "Joules");
> +EVENT_ATTR_STR(energy-gfx.unit  , rapl_gfx_unit, "Joules");

Nit: I think these fields have all similar lengths so they should be 
vertically aligned, something like:

 EVENT_ATTR_STR(energy-cores, rapl_cores, "event=0x01");
 EVENT_ATTR_STR(energy-pkg  , rapl_pkg  , "event=0x02");
 EVENT_ATTR_STR(energy-ram  , rapl_ram  , "event=0x03");
 EVENT_ATTR_STR(energy-gfx  , rapl_gfx  , "event=0x04");

 EVENT_ATTR_STR(energy-cores.unit, rapl_cores_unit, "Joules");
 EVENT_ATTR_STR(energy-pkg.unit  , rapl_pkg_unit  , "Joules");
 EVENT_ATTR_STR(energy-ram.unit  , rapl_ram_unit  , "Joules");
 EVENT_ATTR_STR(energy-gfx.unit  , rapl_gfx_unit  , "Joules");

Also, instead of 'gfx', shouldn't it be 'gpu' throughout the patch?

Thanks,

	Ingo

  reply	other threads:[~2013-12-17 10:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 20:20 [PATCH 0/2] perf/x86: various RAPL improvements Stephane Eranian
2013-12-16 20:20 ` [PATCH 1/2] perf/x86: enable Haswell Celeron RAPL support Stephane Eranian
2013-12-18 10:32   ` [tip:perf/core] " tip-bot for Stephane Eranian
2013-12-16 20:20 ` [PATCH 2/2] perf/x86: add RAPL PP1 energy counter support Stephane Eranian
2013-12-17 10:42   ` Ingo Molnar [this message]
2013-12-17 14:15   ` Ingo Molnar
2013-12-17  9:02 ` [PATCH 0/2] perf/x86: various RAPL improvements Peter Zijlstra

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=20131217104251.GA27274@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maria.n.dimakopoulou@gmail.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=vincent.weaver@maine.edu \
    --cc=zheng.z.yan@intel.com \
    /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

Powered by JetHome