From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
"mingo@elte.hu" <mingo@elte.hu>,
"ak@linux.intel.com" <ak@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
"Yan, Zheng" <zheng.z.yan@intel.com>,
Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH v3 3/4] perf,x86: add Intel RAPL PMU support
Date: Mon, 28 Oct 2013 13:17:47 +0100 [thread overview]
Message-ID: <20131028121747.GL19466@laptop.lan> (raw)
In-Reply-To: <CABPqkBShxTc3wBkwWej6gaWJK3GmdtV71hNdozabnbwpesXx_A@mail.gmail.com>
On Mon, Oct 28, 2013 at 11:33:50AM +0100, Stephane Eranian wrote:
> If we have that, then it may not be necessary anymore
> to express the raw count in the 1/2^32 J unit like we
> are currently doing. This loses a bit of precision. We
> could as well expose the actual raw count and export
> the actual unit via sysfs. For instance, on SNB/IVB the
> unit is 1/2^16, but on Haswell it is 1/2^14.
2^-32 can losslessly express both 2^-16 and 2^-14.
Notably: 2^18/2^32 = 2^(18-32) = 2^-14.
So no, 2^-32 does not loose precision.
The only side effect of always using 2^-32 is that we can only maximally
represent 2^32 (from 64-32), whereas when using 2^-14 we could maximally
represent 2^50.
That said; 2^32 Joule ~ 4.2 GJ which is a rather large quantity of
energy; one I would hope is out there when measuring package energy
costs over any reasonable amount of time.
So the only reason to switch away from using the 32.32 fixed point would
be if someone can make a reasonable argument for why 4.2 GJ is not
sufficient and they need 1 PJ (yes, peta-joule, as in we need a private
nuclear reactor to power this CPU).
next prev parent reply other threads:[~2013-10-28 12:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-23 12:58 [PATCH v3 0/4] perf,x86: add Intel RAPL PMU support Stephane Eranian
2013-10-23 12:58 ` [PATCH v3 1/4] perf: add active_entry list head to struct perf_event Stephane Eranian
2013-10-25 14:56 ` Jiri Olsa
2013-10-26 16:57 ` Stephane Eranian
2013-10-26 17:44 ` Jiri Olsa
2013-10-28 9:58 ` Stephane Eranian
2013-10-23 12:58 ` [PATCH v3 2/4] perf stat: add event unit and scale support Stephane Eranian
2013-10-23 12:58 ` [PATCH v3 3/4] perf,x86: add Intel RAPL PMU support Stephane Eranian
2013-10-25 11:13 ` Jiri Olsa
2013-10-25 11:13 ` Jiri Olsa
2013-10-25 11:14 ` Jiri Olsa
2013-10-26 17:00 ` Stephane Eranian
2013-10-28 10:33 ` Stephane Eranian
2013-10-28 12:17 ` Peter Zijlstra [this message]
2013-10-28 15:54 ` Stephane Eranian
2013-10-23 12:58 ` [PATCH v3 4/4] perf,x86: add RAPL hrtimer support Stephane Eranian
2013-10-25 17:44 ` Jiri Olsa
2013-10-26 17:07 ` Stephane Eranian
2013-10-26 17:53 ` Jiri Olsa
2013-10-28 9:55 ` Stephane Eranian
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=20131028121747.GL19466@laptop.lan \
--to=peterz@infradead.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=mingo@elte.hu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.