From: "Grzegorzek, Dominik" <dominik.grzegorzek@intel.com>
To: "mika.kuoppala@linux.intel.com" <mika.kuoppala@linux.intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Cc: "Manszewski, Christoph" <christoph.manszewski@intel.com>
Subject: Re: [PATCH i-g-t 1/3] tests/xe_eudebug: Keep engine for each client
Date: Thu, 26 Sep 2024 14:06:57 +0000 [thread overview]
Message-ID: <f9d7b42576b7e085b9e94cdb503dc8bf5b0e06e2.camel@intel.com> (raw)
In-Reply-To: <20240926103939.550907-1-mika.kuoppala@linux.intel.com>
On Thu, 2024-09-26 at 13:39 +0300, Mika Kuoppala wrote:
> If we only find hardware engine for first client,
> it can be stale for other clients, after we close
> the first client, as it was associated through the fd
> and we should not trust lib/xe internals how it handles
> the engine array.
>
> I found this when trying to track down:
>
> [ 132.467616] xe 0000:00:02.0: [drm] *ERROR* Ioctl argument check
> failed at drivers/gpu/drm/xe/xe_exec_queue.c:611:
> eci[0].gt_id >= xe->info.gt_count
>
> transient error when running xe_eudebug@discovery-empty.
> Implying that a provided class_instance was corrupted/stale.
>
> Rediscover the engine for each opened client so that
> it points to a proper valid entry for exec_queue_create.
>
> Cc: Christoph Manszewski <christoph.manszewski@intel.com>
> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Looks good to me.
It is:
Reviewed-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
> ---
> tests/intel/xe_eudebug.c | 18 ++++++------------
> 1 file changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/tests/intel/xe_eudebug.c b/tests/intel/xe_eudebug.c
> index 40e07ddf6..a2b2f3596 100644
> --- a/tests/intel/xe_eudebug.c
> +++ b/tests/intel/xe_eudebug.c
> @@ -1007,7 +1007,6 @@ static void test_basic_discovery(int fd, unsigned int flags, bool match_opposite
> #define DISCOVERY_VM_BIND (1 << 3)
> static void run_discovery_client(struct xe_eudebug_client *c)
> {
> - struct drm_xe_engine_class_instance *hwe = NULL;
> int fd[RESOURCE_COUNT], i;
> bool skip_sleep = c->flags & (DISCOVERY_DESTROY_RESOURCES | DISCOVERY_CLOSE_CLIENT);
> uint64_t addr = 0x1a0000;
> @@ -1015,20 +1014,15 @@ static void run_discovery_client(struct xe_eudebug_client *c)
> srand(getpid());
>
> for (i = 0; i < RESOURCE_COUNT; i++) {
> + struct drm_xe_engine_class_instance *hwe = NULL;
> +
> fd[i] = xe_eudebug_client_open_driver(c);
>
> - if (!i) {
> - bool found = false;
> + /* Get first */
> + xe_eudebug_for_each_engine(fd[i], hwe)
> + break;
>
> - xe_for_each_engine(fd[0], hwe) {
> - if (hwe->engine_class == DRM_XE_ENGINE_CLASS_COMPUTE ||
> - hwe->engine_class == DRM_XE_ENGINE_CLASS_RENDER) {
> - found = true;
> - break;
> - }
> - }
> - igt_assert(found);
> - }
> + igt_assert(hwe);
>
> /*
> * Give the debugger a break in event stream after every
next prev parent reply other threads:[~2024-09-26 14:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 10:39 [PATCH i-g-t 1/3] tests/xe_eudebug: Keep engine for each client Mika Kuoppala
2024-09-26 10:39 ` [PATCH i-g-t 2/3] tests/xe_eudebug: Detect thread starvation on discovery Mika Kuoppala
2024-09-26 14:18 ` Grzegorzek, Dominik
2024-09-26 10:39 ` [PATCH i-g-t 3/3] lib/xe_eudebug: Warn on pipe timeouts Mika Kuoppala
2024-09-26 14:38 ` Grzegorzek, Dominik
2024-09-26 11:49 ` ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/xe_eudebug: Keep engine for each client Patchwork
2024-09-26 12:07 ` ✗ CI.xeBAT: failure " Patchwork
2024-09-26 14:06 ` Grzegorzek, Dominik [this message]
2024-09-26 15:11 ` ✗ Fi.CI.IGT: " Patchwork
2024-09-27 6:02 ` ✗ CI.xeFULL: " 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=f9d7b42576b7e085b9e94cdb503dc8bf5b0e06e2.camel@intel.com \
--to=dominik.grzegorzek@intel.com \
--cc=christoph.manszewski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mika.kuoppala@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