From: Matt Roper <matthew.d.roper@intel.com>
To: Brian Welty <brian.welty@intel.com>
Cc: <igt-dev@lists.freedesktop.org>,
Priyanka Dandamudi <priyanka.dandamudi@intel.com>,
Janga Rahul Kumar <janga.rahul.kumar@intel.com>
Subject: Re: [PATCH i-g-t] tests/intel/xe_exec_fault_mode: Fix misuse of __xe_wait_ufence
Date: Mon, 22 Apr 2024 21:36:49 -0700 [thread overview]
Message-ID: <20240423043649.GC5615@mdroper-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <20240419185739.30993-1-brian.welty@intel.com>
On Fri, Apr 19, 2024 at 11:57:39AM -0700, Brian Welty wrote:
> When confirming that xe_exec() user_fences completed, this is performed
> in a loop. When using __xe_wait_ufence(), it returns an updated timeout
> value to reflect how much time was remaining. As side-effect, when calling
> in a loop without resetting the timeout, the timeout value will get
> progressively smaller over many iterations.
> We don't want a smaller timeout to be used on each subsequent call to
> __xe_wait_ufence(), so fix here is to reset the timeout inside the loop.
> This issue is visible in simulation runs due to the slower execution time,
> where later iterations of the wait are failing due to timeout being too
> small.
>
> Signed-off-by: Brian Welty <brian.welty@intel.com>
> ---
> tests/intel/xe_exec_fault_mode.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/xe_exec_fault_mode.c b/tests/intel/xe_exec_fault_mode.c
> index 40fe1743e4..c0d082e7fa 100644
> --- a/tests/intel/xe_exec_fault_mode.c
> +++ b/tests/intel/xe_exec_fault_mode.c
> @@ -273,11 +273,12 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
> }
> }
> if (!(flags & INVALID_FAULT)) {
> - int64_t timeout = ONE_SEC;
> + int64_t timeout;
Should we just move the whole variable declaration down inside the loop?
There doesn't appear to be a need to declare it at this level.
Either way,
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
>
> j = flags & INVALIDATE ? n_execs - 1 : 0;
>
> for (i = j; i < n_execs; i++) {
> + timeout = ONE_SEC;
> if (flags & INVALID_VA && !(flags & ENABLE_SCRATCH))
> igt_assert_eq(__xe_wait_ufence(fd, &data[i].exec_sync, USER_FENCE_VALUE,
> exec_queues[i % n_exec_queues], &timeout), -EIO);
> --
> 2.43.0
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
prev parent reply other threads:[~2024-04-23 4:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 18:57 [PATCH i-g-t] tests/intel/xe_exec_fault_mode: Fix misuse of __xe_wait_ufence Brian Welty
2024-04-19 19:33 ` ✗ Fi.CI.BAT: failure for " Patchwork
2024-04-23 19:54 ` Kamil Konieczny
2024-04-19 21:35 ` ✓ CI.xeBAT: success " Patchwork
2024-04-23 4:36 ` Matt Roper [this message]
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=20240423043649.GC5615@mdroper-desk1.amr.corp.intel.com \
--to=matthew.d.roper@intel.com \
--cc=brian.welty@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=janga.rahul.kumar@intel.com \
--cc=priyanka.dandamudi@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