Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: <fei.yang@intel.com>
Cc: <igt-dev@lists.freedesktop.org>, <ashutosh.dixit@intel.com>,
	<nirmoy.das@intel.com>, <priyanka.dandamudi@intel.com>,
	<apoorva.singh@intel.com>
Subject: Re: [i-g-t 1/1] tests/intel/xe_exec_fault_mode: wait for the completion
Date: Fri, 25 Oct 2024 00:41:56 +0000	[thread overview]
Message-ID: <ZxrpVF3N88rDpyvv@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20241025002322.1422552-2-fei.yang@intel.com>

On Thu, Oct 24, 2024 at 05:23:22PM -0700, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
> 
> The execution on GPU is out of order, the completion of the
> last submission doesn't mean all the jobs are completed. We
> need to make sure all the jobs are completed before moving
> on to unbinding the buffer, otherwise the test would run
> into CAT errors.
> 
> Signed-off-by: Fei Yang <fei.yang@intel.com>
> ---
>  tests/intel/xe_exec_fault_mode.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/intel/xe_exec_fault_mode.c b/tests/intel/xe_exec_fault_mode.c
> index 9cc51b7d3..d416c773b 100644
> --- a/tests/intel/xe_exec_fault_mode.c
> +++ b/tests/intel/xe_exec_fault_mode.c
> @@ -305,7 +305,15 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
>  		}
>  	}
>  	if (!(flags & INVALID_FAULT)) {
> -		j = flags & INVALIDATE ? n_execs - 1 : 0;
> +		/*
> +		 * For !RACE cases xe_wait_ufence has already been called in above
> +		 * for-loop, we should only wait for the completion of the last
> +		 * submission here. For RACE cases we need to wait for all submissions
> +		 * to complete because the GuC scheduling can be out of order, the
> +		 * completion of the last submission doesn't mean all submission are
> +		 * completed.
> +		 */
> +		j = (flags & INVALIDATE && !(flags & RACE)) ? n_execs - 1 : 0;

This makes sense and xe_exec_threads has similar code to this in
function test_compute_mode() and given that is threaded test much more
likely to hit this race.

I checked xe_exec_compute_mode and I believe we need a similar patch for
that test too. While you are here can you fixup that test too?

This patch LGTM though, with that:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>

>  
>  		for (i = j; i < n_execs; i++) {
>  			int64_t timeout = NSEC_PER_SEC;
> -- 
> 2.25.1
> 

  reply	other threads:[~2024-10-25  0:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25  0:23 [i-g-t 0/1] tests/intel/xe_exec_fault_mode: wait for the completion fei.yang
2024-10-25  0:23 ` [i-g-t 1/1] " fei.yang
2024-10-25  0:41   ` Matthew Brost [this message]
2024-10-25  5:15     ` Yang, Fei
2024-10-25 19:04       ` Matthew Brost
2024-10-25 19:58         ` Yang, Fei
2024-10-25  1:31 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-10-25  1:47 ` ✗ CI.xeBAT: failure " Patchwork
2024-10-25  2:27 ` ✗ Fi.CI.IGT: " Patchwork
2024-10-25  5:21 ` ✓ Fi.CI.BAT: success for tests/intel/xe_exec_fault_mode: wait for the completion (rev2) Patchwork
2024-10-25  5:26 ` ✓ CI.xeBAT: " Patchwork
2024-10-25  6:18 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-10-26 11:13 ` ✗ CI.xeFULL: failure for tests/intel/xe_exec_fault_mode: wait for the completion Patchwork
2024-11-07 14:36   ` Nirmoy Das
2024-10-26 15:41 ` ✗ CI.xeFULL: failure for tests/intel/xe_exec_fault_mode: wait for the completion (rev2) Patchwork
2024-10-29 12:20 ` 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=ZxrpVF3N88rDpyvv@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=apoorva.singh@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=fei.yang@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=nirmoy.das@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