From: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
To: Xin Wang <x.wang@intel.com>
Cc: <igt-dev@lists.freedesktop.org>, <stuart.summers@intel.com>
Subject: Re: [PATCH] tests/intel/xe_exec_multi_queue: enable preempt flag for Q0
Date: Tue, 13 Jan 2026 22:39:32 -0800 [thread overview]
Message-ID: <aWc6JMjfLxSycokG@nvishwa1-desk> (raw)
In-Reply-To: <20260114063236.831396-1-x.wang@intel.com>
On Wed, Jan 14, 2026 at 06:32:36AM +0000, Xin Wang wrote:
>The spinner preempt flag enables queue preemption and multi-queue
>switching. Always enable premept flag while inserting multi-queue
>switch point. We need multi-queue switch point only in Q0 which
>acts as a gating queue until all other queues with different
>priorities are submitted to hardware.
NIT...may be bit of rewording...
"In priority test, we need multi-queue switch point only in Q0..."
In any case, LGTM.
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
>
>Suggested-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
>Signed-off-by: Xin Wang <x.wang@intel.com>
>---
> lib/xe/xe_spin.c | 2 +-
> tests/intel/xe_exec_multi_queue.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/lib/xe/xe_spin.c b/lib/xe/xe_spin.c
>index 4dc110c22..0bc06aec3 100644
>--- a/lib/xe/xe_spin.c
>+++ b/lib/xe/xe_spin.c
>@@ -181,7 +181,7 @@ void xe_spin_init(struct xe_spin *spin, struct xe_spin_opts *opts)
> */
> if (opts->multi_queue_switch) {
> uint64_t wait_addr = opts->addr + offsetof(struct xe_spin, wait_cond);
>-
>+ igt_assert_f(opts->preempt, "preempt field is required to enable multi-queue switching\n");
> spin->batch[b++] = MI_SEMAPHORE_WAIT_CMD |
> MI_SEMAPHORE_POLL |
> MI_SEMAPHORE_QUEUE_SWITCH_MODE |
>diff --git a/tests/intel/xe_exec_multi_queue.c b/tests/intel/xe_exec_multi_queue.c
>index 6bc6f9f63..32a84ef6b 100644
>--- a/tests/intel/xe_exec_multi_queue.c
>+++ b/tests/intel/xe_exec_multi_queue.c
>@@ -453,8 +453,8 @@ __test_priority(int fd, struct drm_xe_engine_class_instance *eci,
>
> for (i = 0; i < num_queues; i++) {
> uint64_t spin_addr = addr + i * sizeof(struct xe_spin);
>-
>- xe_spin_init_opts(spin[i], .addr = spin_addr, .multi_queue_switch = true);
>+ /* Insert multi-queue switch point in Q0 to validate priority based queue switching */
>+ xe_spin_init_opts(spin[i], .addr = spin_addr, .multi_queue_switch = !i, .preempt = !i);
> sync.addr = spin_addr + (char *)&spin[i]->exec_sync - (char *)spin[i];
> exec.exec_queue_id = exec_queues[i];
> exec.address = spin_addr;
>--
>2.43.0
>
prev parent reply other threads:[~2026-01-14 6:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 6:32 [PATCH] tests/intel/xe_exec_multi_queue: enable preempt flag for Q0 Xin Wang
2026-01-14 6:39 ` Niranjana Vishwanathapura [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=aWc6JMjfLxSycokG@nvishwa1-desk \
--to=niranjana.vishwanathapura@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=stuart.summers@intel.com \
--cc=x.wang@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