All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: fei.yang@intel.com, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Serialize migrate ULLS enter against a pending exit
Date: Fri, 20 Nov 2026 00:15:26 +0000	[thread overview]
Message-ID: <sashiko-outbox-224261@kernel.org> (raw)
In-Reply-To: <20261120001054.3901642-1-fei.yang@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/xe: missing Fixes trailer for xe_migrate_ulls_exit() race
  fix
--

commit ec3c80079d880e245d587b5f95313394facd8925
Author: Fei Yang <fei.yang@intel.com>

> drm/xe: Serialize migrate ULLS enter against a pending exit
>
> xe_migrate_ulls_exit() clears ulls.enabled as soon as the ULLS_EXIT job is
> pushed, and drops job_mutex without waiting for it. A page fault arriving
> in that window finds ULLS disabled and pushes a ULLS_ENTER job while the
> previous ULLS chain is still executing.
>
> ULLS_ENTER is not chained, so submit_exec_queue() publishes its ring tail
> with xe_lrc_set_ring_tail(). That only updates the saved tail in the
> context image, which is what a context restore loads RING_TAIL from. It is
> therefore correct for a context that is off the hardware - but the context
> only leaves the hardware once the exit job has retired.
>
> Submitted before then, that write races the postamble of the job preceding
> the exit job. The postamble publishes the same saved tail, and RING_TAIL,
> at the end of the exit job. If it lands after the CPU's write the tail is
> rewound behind the enter job, which the command streamer never executes.
> Its fence never signals, so job_cnt never drops, xe_exec_queue_is_idle()
> stays false and the exit worker re-arms itself forever while the context
> sits parked on the engine.
>
> Wait for the exit job's fence in the exit worker before dropping
> job_mutex. xe_migrate_ulls_enter() takes job_mutex to submit, so it is
> serialized behind the exit job retiring. The exit job carries no batch
> and is only pushed once the queue is idle, so the wait is short and
> depends on nothing else on the queue.
>
> Assisted-by: LLM
> Signed-off-by: Fei Yang <fei.yang@intel.com>

[Severity: Low]
This fixes a race in xe_migrate_ulls_exit() that can hang the migration
queue.  Should this include:

  Fixes: 8ab0d5ca31ca ("drm/xe: Add ULLS migration job support to migration layer")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261120001054.3901642-1-fei.yang@intel.com?part=1

  reply	other threads:[~2026-11-20  0:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  0:10 [PATCH] drm/xe: Serialize migrate ULLS enter against a pending exit fei.yang
2026-11-20  0:15 ` sashiko-bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-20  0:46 fei.yang
2026-11-20  2:34 ` Matthew Brost

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=sashiko-outbox-224261@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=fei.yang@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.