From: "Gupta, Anshuman" <anshuman.gupta@intel.com>
To: "Tauro, Riana" <riana.tauro@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 1/1] tests/i915/pm_rc6_residency: Extend rc6-idle test on remaining engines
Date: Wed, 8 Jun 2022 08:56:30 +0000 [thread overview]
Message-ID: <d2d2c3b0212946399df836f54aef4f9e@intel.com> (raw)
In-Reply-To: <20220608045405.1445705-2-riana.tauro@intel.com>
> -----Original Message-----
> From: Tauro, Riana <riana.tauro@intel.com>
> Sent: Wednesday, June 8, 2022 10:24 AM
> To: igt-dev@lists.freedesktop.org
> Cc: Tauro, Riana <riana.tauro@intel.com>; Gupta, Anshuman
> <anshuman.gupta@intel.com>
> Subject: [PATCH i-g-t 1/1] tests/i915/pm_rc6_residency: Extend rc6-idle test on
> remaining engines
>
> rc6-idle should set up bg_load() on single instance of every engine
Please create a dynamic test for single instance of each engine.
We need to know which engine is failing the test.
Regards,
Anshuman Gupta.
>
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> ---
> tests/i915/i915_pm_rc6_residency.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/tests/i915/i915_pm_rc6_residency.c
> b/tests/i915/i915_pm_rc6_residency.c
> index cf9eae90..1668372a 100644
> --- a/tests/i915/i915_pm_rc6_residency.c
> +++ b/tests/i915/i915_pm_rc6_residency.c
> @@ -292,9 +292,10 @@ static void sighandler(int sig) { }
>
> -static void bg_load(int i915, unsigned int flags, unsigned long *ctl)
> +static void bg_load(int i915, const intel_ctx_t *ctx, unsigned int
> +flags, unsigned long *ctl)
> {
> const bool has_execlists = intel_gen(intel_get_drm_devid(i915)) >= 8;
> + const struct intel_execution_engine2 *e;
> struct drm_i915_gem_exec_object2 obj = {
> .handle = batch_create(i915),
> };
> @@ -313,7 +314,13 @@ static void bg_load(int i915, unsigned int flags,
> unsigned long *ctl)
>
> igt_nsec_elapsed(&tv);
>
> - gem_execbuf(i915, &execbuf);
> + for_each_ctx_engine(i915, ctx, e) {
> + if (e->instance == 0) {
> + execbuf.flags = e->flags;
> + gem_execbuf(i915, &execbuf);
> + }
> + }
> +
> submit = igt_nsec_elapsed(&tv);
> if (flags & WAITBOOST) {
> gem_sync(i915, obj.handle);
> @@ -362,6 +369,7 @@ static void rc6_idle(int i915) {
> const int64_t duration_ns = SLEEP_DURATION *
> (int64_t)NSEC_PER_SEC;
> const int tolerance = 20; /* Some RC6 is better than none! */
> + const intel_ctx_t *ctx;
> const unsigned int gen = intel_gen(intel_get_drm_devid(i915));
> struct {
> const char *name;
> @@ -379,6 +387,7 @@ static void rc6_idle(int i915)
> struct rapl rapl;
> int fd;
>
> + ctx = intel_ctx_create_all_physical(i915);
> fd = open_pmu(i915, I915_PMU_RC6_RESIDENCY);
> igt_drop_caches_set(i915, DROP_IDLE);
> igt_require(__pmu_wait_for_rc6(fd));
> @@ -404,7 +413,7 @@ static void rc6_idle(int i915)
> for (int p = 0; p < ARRAY_SIZE(phases); p++) {
> memset(done, 0, 2 * sizeof(*done));
> igt_fork(child, 1) /* Setup up a very light load */
> - bg_load(i915, phases[p].flags, done);
> + bg_load(i915, ctx, phases[p].flags, done);
>
> rapl_read(&rapl, &sample[0]);
> cycles = -READ_ONCE(done[1]);
> @@ -436,6 +445,7 @@ static void rc6_idle(int i915)
> }
>
> munmap(done, 4096);
> + intel_ctx_destroy(i915, ctx);
> close(fd);
>
> rapl_close(&rapl);
> --
> 2.25.1
next prev parent reply other threads:[~2022-06-08 8:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 4:54 [igt-dev] [PATCH i-g-t 0/1] Extend rc6-idle Riana Tauro
2022-06-08 4:54 ` [igt-dev] [PATCH i-g-t 1/1] tests/i915/pm_rc6_residency: Extend rc6-idle test on remaining engines Riana Tauro
2022-06-08 8:56 ` Gupta, Anshuman [this message]
2022-06-08 7:42 ` [igt-dev] ✓ Fi.CI.BAT: success for Extend rc6-idle Patchwork
2022-06-08 15:46 ` [igt-dev] ✓ 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=d2d2c3b0212946399df836f54aef4f9e@intel.com \
--to=anshuman.gupta@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=riana.tauro@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