All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bernatowicz, Marcin" <marcin.bernatowicz@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [PATCH v3 1/5] tests/intel/xe_exec_reset: Add job cancel tests
Date: Tue, 30 Sep 2025 13:21:08 +0200	[thread overview]
Message-ID: <000835ff-e8aa-4964-9886-7a31d804472b@linux.intel.com> (raw)
In-Reply-To: <20250923211333.766147-2-matthew.brost@intel.com>



On 9/23/2025 11:13 PM, Matthew Brost wrote:
> This test has pulled out when the ability to set the job timeout via
> IOCTL was removed from the uAPI while upstreaming Xe. Add this coverage
> back in but only run on a single hardware engine given by default jobs
> take 5 seconds to timeout.
> 
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>   lib/xe/xe_legacy.c          |  3 ++-
>   tests/intel/xe_exec_reset.c | 23 ++++++++++++++++++++++-
>   2 files changed, 24 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/xe/xe_legacy.c b/lib/xe/xe_legacy.c
> index 6570cf1e6e..669ecff7aa 100644
> --- a/lib/xe/xe_legacy.c
> +++ b/lib/xe/xe_legacy.c
> @@ -12,6 +12,7 @@
>   
>   /* Batch buffer element count, in number of dwords(u32) */
>   #define BATCH_DW_COUNT			16
> +#define PREEMPT				(0x1 << 6)
>   #define CAT_ERROR			(0x1 << 5)
>   #define CLOSE_EXEC_QUEUES		(0x1 << 2)
>   #define CLOSE_FD			(0x1 << 1)
> @@ -56,7 +57,7 @@ xe_legacy_test_mode(int fd, struct drm_xe_engine_class_instance *eci,
>   		u64 pad;
>   		u32 data;
>   	} *data;
> -	struct xe_spin_opts spin_opts = { .preempt = false };
> +	struct xe_spin_opts spin_opts = { .preempt = flags & PREEMPT };
>   	int i, b;
>   
>   	igt_assert_lte(n_exec_queues, MAX_N_EXECQUEUES);
> diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
> index 7ae53c6790..72b85d3e7b 100644
> --- a/tests/intel/xe_exec_reset.c
> +++ b/tests/intel/xe_exec_reset.c
> @@ -116,6 +116,7 @@ static void test_spin(int fd, struct drm_xe_engine_class_instance *eci,
>   #define VIRTUAL				(0x1 << 3)
>   #define PARALLEL			(0x1 << 4)
>   #define CAT_ERROR			(0x1 << 5)
> +#define PREEMPT				(0x1 << 6)
>   
>   /**
>    * SUBTEST: %s-cat-error
> @@ -295,6 +296,12 @@ test_balancer(int fd, int gt, int class, int n_exec_queues, int n_execs,
>    * SUBTEST: cat-error
>    * Description: Test cat error
>    *
> + * SUBTEST: cancel
> + * Description: Test job cancel
> + *
> + * SUBTEST: cancel-preempt
> + * Description: Test job cancel with a preemptable job
> + *
>    * SUBTEST: gt-reset
>    * Description: Test GT reset
>    *
> @@ -350,7 +357,7 @@ test_compute_mode(int fd, struct drm_xe_engine_class_instance *eci,
>   		uint64_t exec_sync;
>   		uint32_t data;
>   	} *data;
> -	struct xe_spin_opts spin_opts = { .preempt = false };
> +	struct xe_spin_opts spin_opts = { .preempt = flags & PREEMPT };
>   	int i, b;
>   
>   	igt_assert_lte(n_exec_queues, MAX_N_EXECQUEUES);
> @@ -659,6 +666,20 @@ igt_main
>   			xe_legacy_test_mode(fd, hwe, 2, 2, CAT_ERROR,
>   					    LEGACY_MODE_ADDR, false);
>   
> +	igt_subtest("cancel")
> +		xe_for_each_engine(fd, hwe) {
> +			xe_legacy_test_mode(fd, hwe, 1, 1, 0,
> +					    LEGACY_MODE_ADDR, false);
> +			break;
> +		}
> +
> +	igt_subtest("cancel-preempt")
> +		xe_for_each_engine(fd, hwe) {
> +			xe_legacy_test_mode(fd, hwe, 1, 1, PREEMPT,
> +					    LEGACY_MODE_ADDR, false);
> +			break;
> +		}
> +
>   	igt_subtest("gt-reset")
>   		xe_for_each_engine(fd, hwe)
>   			xe_legacy_test_mode(fd, hwe, 2, 2, GT_RESET,
LGTM,
Reviewed-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>


  reply	other threads:[~2025-09-30 11:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 21:13 [PATCH v3 0/5] Add tests to help verify VF migration Matthew Brost
2025-09-23 21:13 ` [PATCH v3 1/5] tests/intel/xe_exec_reset: Add job cancel tests Matthew Brost
2025-09-30 11:21   ` Bernatowicz, Marcin [this message]
2025-09-23 21:13 ` [PATCH v3 2/5] tests/intel/xe_exec_reset: Add timeslice preempt test Matthew Brost
2025-09-30 13:10   ` Bernatowicz, Marcin
2025-09-23 21:13 ` [PATCH v3 3/5] tests/intel/xe_exec_reset: Long spin tests Matthew Brost
2025-09-30 13:12   ` Bernatowicz, Marcin
2025-09-23 21:13 ` [PATCH v3 4/5] tests/intel/xe_exec_reset: Add long-spin-sys-reuse-many-preempt-threads Matthew Brost
2025-09-30 13:13   ` Bernatowicz, Marcin
2025-09-23 21:13 ` [PATCH v3 5/5] tests/intel/xe_exec_reset: Add long-spin-comp-reuse-many-preempt-threads Matthew Brost
2025-09-30 14:29   ` Bernatowicz, Marcin
2025-10-01  2:24     ` Matthew Brost
2025-10-01 17:41       ` Bernatowicz, Marcin
2025-09-30 17:35   ` Kamil Konieczny
2025-10-01  2:18     ` Matthew Brost
2025-10-01 11:55       ` Kamil Konieczny
2025-10-01 11:46   ` K V P, Satyanarayana
2025-10-06  9:17     ` Matthew Brost
2025-10-06 11:37       ` K V P, Satyanarayana
2025-09-24  1:48 ` ✓ Xe.CI.BAT: success for Add tests to help verify VF migration (rev3) Patchwork
2025-09-24  2:05 ` ✓ i915.CI.BAT: " Patchwork
2025-09-24  6:26 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-24 16:44 ` ✗ i915.CI.Full: " 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=000835ff-e8aa-4964-9886-7a31d804472b@linux.intel.com \
    --to=marcin.bernatowicz@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=matthew.brost@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.