From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Fix frequency and rc6 counters
Date: Wed, 24 May 2023 09:37:11 -0700 [thread overview]
Message-ID: <ZG49N4hh1dKDHduR@orsosgc001.jf.intel.com> (raw)
In-Reply-To: <20230523152407.828236-1-tvrtko.ursulin@linux.intel.com>
On Tue, May 23, 2023 at 04:24:07PM +0100, Tvrtko Ursulin wrote:
>From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
>Need to reset aggregated counters before adding to them otherwise numbers
>will grow endlessly.
>
>Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>Fixes: 3dadeff69d4a ("intel_gpu_top: Switch pmu_counter to use aggregated values")
>Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
>---
> tools/intel_gpu_top.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
>index 4e49367a70c7..a89f13d46f11 100644
>--- a/tools/intel_gpu_top.c
>+++ b/tools/intel_gpu_top.c
>@@ -710,6 +710,10 @@ static void pmu_sample(struct engines *engines)
> engines->ts.prev = engines->ts.cur;
> engines->ts.cur = pmu_read_multi(engines->fd, num_val, val);
>
>+ engines->freq_req.val.cur = engines->freq_req.val.prev = 0;
>+ engines->freq_act.val.cur = engines->freq_act.val.prev = 0;
>+ engines->rc6.val.cur = engines->rc6.val.prev = 0;
>+
lgtm,
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Umesh
> for (i = 0; i < engines->num_gts; i++) {
> update_sample(&engines->freq_req_gt[i], val);
> engines->freq_req.val.cur += engines->freq_req_gt[i].val.cur;
>--
>2.39.2
>
next prev parent reply other threads:[~2023-05-24 16:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 15:24 [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Fix frequency and rc6 counters Tvrtko Ursulin
2023-05-24 16:37 ` Umesh Nerlige Ramappa [this message]
2023-05-24 16:44 ` Tvrtko Ursulin
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=ZG49N4hh1dKDHduR@orsosgc001.jf.intel.com \
--to=umesh.nerlige.ramappa@intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=tvrtko.ursulin@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