From: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>
To: "Harrison, John C" <john.c.harrison@intel.com>,
"Nerlige Ramappa, Umesh" <umesh.nerlige.ramappa@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>
Subject: Re: [Intel-gfx] [PATCH] i915/pmu: Move execlist stats initialization to execlist specific setup
Date: Wed, 13 Sep 2023 20:50:41 +0000 [thread overview]
Message-ID: <80d06a7e53e6df0bd6073cbb72fba0094ffa1ca9.camel@intel.com> (raw)
In-Reply-To: <20230912212247.1828681-1-umesh.nerlige.ramappa@intel.com>
I went up the call stack to ensure the differences between the
old and new location isnt skipping over other functions that may reference
something engine related (that may also end up triggering stats variabls).
Without digging further, i see the old postion here:
i915_driver_probe -> i915_driver_mmio_probe -> intel_gt_init_mmio -> intel_engines_init_mmio -> intel_engine_setup
new postion here:
i915_driver_probe -> i915_gem_init -> (for_each_gt) intel_gt_init -> intel_engines_init -> setup (intel_execlists_submission_setup)
And between i915_driver_mmio_probe and i915_gem_init are only mem/ggtt, display and irq related init functions.
That said, LGTM (although you do need to address the BAT failure before merging):
Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>
On Tue, 2023-09-12 at 14:22 -0700, Umesh Nerlige Ramappa wrote:
> engine->stats is a union of execlist and guc stat objects. When execlist
> specific fields are initialized, the initial state of guc stats is
> affected. This results in bad busyness values when using GuC mode. Move
> the execlist initialization from common code to execlist specific code.
>
> Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu")
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 -
> drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2 ++
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index dfb69fc977a0..84a75c95f3f7 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -558,7 +558,6 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id,
> DRIVER_CAPS(i915)->has_logical_contexts = true;
>
> ewma__engine_latency_init(&engine->latency);
> - seqcount_init(&engine->stats.execlists.lock);
>
> ATOMIC_INIT_NOTIFIER_HEAD(&engine->context_status_notifier);
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> index 4d05321dc5b5..e8f42ec6b1b4 100644
> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> @@ -3548,6 +3548,8 @@ int intel_execlists_submission_setup(struct intel_engine_cs *engine)
> logical_ring_default_vfuncs(engine);
> logical_ring_default_irqs(engine);
>
> + seqcount_init(&engine->stats.execlists.lock);
> +
> if (engine->flags & I915_ENGINE_HAS_RCS_REG_STATE)
> rcs_submission_override(engine);
>
next prev parent reply other threads:[~2023-09-13 20:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 21:22 [Intel-gfx] [PATCH] i915/pmu: Move execlist stats initialization to execlist specific setup Umesh Nerlige Ramappa
2023-09-12 22:54 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2023-09-13 20:50 ` Teres Alexis, Alan Previn [this message]
2023-09-13 23:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success for i915/pmu: Move execlist stats initialization to execlist specific setup (rev2) Patchwork
2023-09-14 4:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-15 16:02 ` Umesh Nerlige Ramappa
2023-09-15 16:39 ` Umesh Nerlige Ramappa
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=80d06a7e53e6df0bd6073cbb72fba0094ffa1ca9.camel@intel.com \
--to=alan.previn.teres.alexis@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=john.c.harrison@intel.com \
--cc=umesh.nerlige.ramappa@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