Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: <fei.yang@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [i-g-t 2/4] tests/intel/xe_exec_threads: remove redundant wait
Date: Tue, 5 Nov 2024 15:59:15 -0800	[thread overview]
Message-ID: <20241105235915.GO4891@mdroper-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <20241030230350.1681757-3-fei.yang@intel.com>

On Wed, Oct 30, 2024 at 04:03:48PM -0700, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
> 
> The for-loop for REBIND case accidentally wait twice for the execs of
> 0x20*n interations. Copyi paste the code from INVALIDATE case which is
> correct.
> 
> Signed-off-by: Fei Yang <fei.yang@intel.com>

I'm not super wild about the non-intuitive loop logic (even in the
INVALIDATE case that we're copying from), but this does solve the
unwanted overlap and also makes the two spots in the code consistent.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

Maybe we can come back later and write these loops in a more clear
manner.


Matt

> ---
>  tests/intel/xe_exec_threads.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/intel/xe_exec_threads.c b/tests/intel/xe_exec_threads.c
> index 413d6626b..962957cd7 100644
> --- a/tests/intel/xe_exec_threads.c
> +++ b/tests/intel/xe_exec_threads.c
> @@ -340,7 +340,7 @@ test_compute_mode(int fd, uint32_t vm, uint64_t addr, uint64_t userptr,
>  		xe_exec(fd, &exec);
>  
>  		if (flags & REBIND && i && !(i & 0x1f)) {
> -			for (j = i - 0x20; j <= i; ++j)
> +			for (j = i == 0x20 ? 0 : i - 0x1f; j <= i; ++j)
>  				xe_wait_ufence(fd, &data[j].exec_sync,
>  					       USER_FENCE_VALUE,
>  					       exec_queues[e], fence_timeout);
> -- 
> 2.25.1
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation

  reply	other threads:[~2024-11-05 23:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 23:03 [i-g-t 0/4] separate sync data and batch buffer fei.yang
2024-10-30 23:03 ` [i-g-t 1/4] tests/intel/xe_exec_fault_mode: " fei.yang
2024-11-05 23:55   ` Matt Roper
2024-10-30 23:03 ` [i-g-t 2/4] tests/intel/xe_exec_threads: remove redundant wait fei.yang
2024-11-05 23:59   ` Matt Roper [this message]
2024-10-30 23:03 ` [i-g-t 3/4] tests/intel/xe_exec_threads: wait for all submissions to complete fei.yang
2024-10-30 23:03 ` [i-g-t 4/4] tests/intel/xe_exec_threads: separate sync data and batch buffer fei.yang
2024-10-31  0:57 ` ✓ CI.xeBAT: success for " Patchwork
2024-10-31  0:59 ` ✓ Fi.CI.BAT: " Patchwork
2024-10-31  2:05 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-31 11:10 ` ✗ 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=20241105235915.GO4891@mdroper-desk1.amr.corp.intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=fei.yang@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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