From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Chris Wilson" <chris@chris-wilson.co.uk>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>, Intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 02/11] drm/i915: Add intel_energy_uJ
Date: Fri, 15 Sep 2017 12:16:49 +0100 [thread overview]
Message-ID: <08f9cd87-0969-c08c-cf56-fbf352c0da38@linux.intel.com> (raw)
In-Reply-To: <150547190387.19729.10286345340923714485@mail.alporthouse.com>
On 15/09/2017 11:38, Chris Wilson wrote:
> Quoting Ville Syrjälä (2017-09-15 11:34:03)
>> On Fri, Sep 15, 2017 at 11:07:21AM +0100, Tvrtko Ursulin wrote:
>>>
>>> On 15/09/2017 09:51, Chris Wilson wrote:
>>>> Quoting Tvrtko Ursulin (2017-09-15 07:56:00)
>>>>>
>>>>> On 14/09/2017 21:36, Ville Syrjälä wrote:
>>>>>> On Mon, Sep 11, 2017 at 04:25:50PM +0100, Tvrtko Ursulin wrote:
>>>>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>>>>
>>>>>>> Extract code from i915_energy_uJ (debugfs) so it can be used by
>>>>>>> other callers in future patches.
>>>>>>>
>>>>>>> v2: Rebase.
>>>>>>>
>>>>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>>>> ---
>>>>>>> drivers/gpu/drm/i915/i915_debugfs.c | 17 +----------------
>>>>>>> drivers/gpu/drm/i915/i915_drv.h | 2 ++
>>>>>>> drivers/gpu/drm/i915/intel_pm.c | 25 +++++++++++++++++++++++++
>>>>>>> 3 files changed, 28 insertions(+), 16 deletions(-)
>>>>>>>
>>>>>>> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
>>>>>>> index 6338018f655d..b3a4a66bf7c4 100644
>>>>>>> --- a/drivers/gpu/drm/i915/i915_debugfs.c
>>>>>>> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
>>>>>>> @@ -2780,26 +2780,11 @@ static int i915_sink_crc(struct seq_file *m, void *data)
>>>>>>> static int i915_energy_uJ(struct seq_file *m, void *data)
>>>>>>> {
>>>>>>> struct drm_i915_private *dev_priv = node_to_i915(m->private);
>>>>>>> - unsigned long long power;
>>>>>>> - u32 units;
>>>>>>>
>>>>>>> if (INTEL_GEN(dev_priv) < 6)
>>>>>>> return -ENODEV;
>>>>>>>
>>>>>>> - intel_runtime_pm_get(dev_priv);
>>>>>>> -
>>>>>>> - if (rdmsrl_safe(MSR_RAPL_POWER_UNIT, &power)) {
>>>>>>> - intel_runtime_pm_put(dev_priv);
>>>>>>> - return -ENODEV;
>>>>>>> - }
>>>>>>> -
>>>>>>> - units = (power & 0x1f00) >> 8;
>>>>>>> - power = I915_READ(MCH_SECP_NRG_STTS);
>>>>>>> - power = (1000000 * power) >> units; /* convert to uJ */
>>>>>>> -
>>>>>>> - intel_runtime_pm_put(dev_priv);
>>>>>>> -
>>>>>>> - seq_printf(m, "%llu", power);
>>>>>>> + seq_printf(m, "%llu", intel_energy_uJ(dev_priv));
>>>>>>
>>>>>> Isn't this the same thing as the package energy you get from rapl? Can't
>>>>>> we just nuke this private implementation entirely and rely on whatever
>>>>>> rapl gives us?
>>>>>
>>>>> If so I think we could leave it out of i915 PMU. I tried looking for
>>>>> MCH_SECP_NRG_STTS in bspec but did not find it though? Is your bspec fu
>>>>> perhaps better and you could have a look?
>>>>
>>>> I had it there for the convenience of grabbing everything through the
>>>> one interface (which I still think has merit). I don't I ever compiled
>>>> in the rapl user interface...
>>>
>>> You mean the RAPL PMU, PERF_EVENTS_INTEL_RAPL?
>>
>> I suspect he means sysfs. IIRC this perf+rapl marriage is somewhat
>> recent (or at least I still remeber having to fix it when it was
>> introduced because it broke the sysfs interface).
>
> I hadn't even heard of the perf interface. Yes, if it is available
> through perf, that's just what we want.
Dropping it then. And I've checked in the meantime it is reporting
identical numbers to power/energy-gpu/ provided by the intel_rapl_perf
module.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-09-15 11:16 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 15:25 [RFC v3 00/11] i915 PMU and engine busy stats Tvrtko Ursulin
2017-09-11 15:25 ` [RFC 01/11] drm/i915: Convert intel_rc6_residency_us to ns Tvrtko Ursulin
2017-09-14 19:48 ` Chris Wilson
2017-09-11 15:25 ` [RFC 02/11] drm/i915: Add intel_energy_uJ Tvrtko Ursulin
2017-09-14 19:49 ` Chris Wilson
2017-09-15 9:18 ` Tvrtko Ursulin
2017-09-14 20:36 ` Ville Syrjälä
2017-09-15 6:56 ` Tvrtko Ursulin
2017-09-15 8:51 ` Chris Wilson
2017-09-15 10:07 ` Tvrtko Ursulin
2017-09-15 10:34 ` Ville Syrjälä
2017-09-15 10:38 ` Chris Wilson
2017-09-15 11:16 ` Tvrtko Ursulin [this message]
2017-09-11 15:25 ` [RFC 03/11] drm/i915: Extract intel_get_cagf Tvrtko Ursulin
2017-09-14 19:51 ` Chris Wilson
2017-09-11 15:25 ` [RFC 04/11] drm/i915/pmu: Expose a PMU interface for perf queries Tvrtko Ursulin
2017-09-12 2:06 ` Rogozhkin, Dmitry V
2017-09-12 14:59 ` Tvrtko Ursulin
2017-09-13 8:57 ` [RFC v6 " Tvrtko Ursulin
2017-09-13 10:34 ` [RFC v7 " Tvrtko Ursulin
2017-09-15 0:00 ` Rogozhkin, Dmitry V
2017-09-15 7:57 ` Tvrtko Ursulin
2017-09-14 19:46 ` [RFC " Chris Wilson
2017-09-11 15:25 ` [RFC 05/11] drm/i915/pmu: Suspend sampling when GPU is idle Tvrtko Ursulin
2017-09-13 10:34 ` [RFC v5 " Tvrtko Ursulin
2017-09-14 19:57 ` Chris Wilson
2017-09-15 9:22 ` Tvrtko Ursulin
2017-09-11 15:25 ` [RFC 06/11] drm/i915: Wrap context schedule notification Tvrtko Ursulin
2017-09-11 15:25 ` [RFC 07/11] drm/i915: Engine busy time tracking Tvrtko Ursulin
2017-09-14 20:16 ` Chris Wilson
2017-09-15 9:45 ` Tvrtko Ursulin
2017-09-11 15:25 ` [RFC 08/11] drm/i915: Export engine busy stats in debugfs Tvrtko Ursulin
2017-09-14 20:17 ` Chris Wilson
2017-09-15 9:46 ` Tvrtko Ursulin
2017-09-11 15:25 ` [RFC 09/11] drm/i915/pmu: Wire up engine busy stats to PMU Tvrtko Ursulin
2017-09-11 15:25 ` [RFC 10/11] drm/i915: Export engine stats API to other users Tvrtko Ursulin
2017-09-12 18:35 ` Ben Widawsky
2017-09-14 20:26 ` Chris Wilson
2017-09-15 9:49 ` Tvrtko Ursulin
2017-09-19 19:50 ` Ben Widawsky
2017-09-19 20:11 ` Rogozhkin, Dmitry V
2017-09-29 10:59 ` Joonas Lahtinen
2017-09-11 15:25 ` [RFC 11/11] drm/i915: Gate engine stats collection with a static key Tvrtko Ursulin
2017-09-13 12:18 ` [RFC v3 " Tvrtko Ursulin
2017-09-14 20:22 ` Chris Wilson
2017-09-15 9:51 ` Tvrtko Ursulin
2017-09-11 15:50 ` ✗ Fi.CI.BAT: warning for i915 PMU and engine busy stats (rev3) Patchwork
2017-09-12 2:03 ` [RFC v3 00/11] i915 PMU and engine busy stats Rogozhkin, Dmitry V
2017-09-12 14:54 ` Tvrtko Ursulin
2017-09-12 22:01 ` Rogozhkin, Dmitry V
2017-09-13 8:54 ` [RFC v6 04/11] drm/i915/pmu: Expose a PMU interface for perf queries Tvrtko Ursulin
2017-09-13 9:01 ` [RFC v3 00/11] i915 PMU and engine busy stats Tvrtko Ursulin
2017-09-13 9:34 ` ✗ Fi.CI.BAT: warning for i915 PMU and engine busy stats (rev4) Patchwork
2017-09-13 10:46 ` ✗ Fi.CI.BAT: failure for i915 PMU and engine busy stats (rev6) Patchwork
2017-09-13 13:27 ` ✓ Fi.CI.BAT: success for i915 PMU and engine busy stats (rev7) Patchwork
2017-09-13 21:24 ` ✓ Fi.CI.IGT: " Patchwork
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=08f9cd87-0969-c08c-cf56-fbf352c0da38@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=peterz@infradead.org \
--cc=ville.syrjala@linux.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