✗ CI.checkpatch: warning for drm/sched: Increment job count before swapping tail spsc queue

Patchwork patchwork at emeril.freedesktop.org
Sat Jun 14 00:18:47 UTC 2025


== Series Details ==

Series: drm/sched: Increment job count before swapping tail spsc queue
URL   : https://patchwork.freedesktop.org/series/150259/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
f8ff75ae1d2127635239b134695774ed4045d05b
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 639634fe6da168377daade63c2395e028ae87bec
Author: Matthew Brost <matthew.brost at intel.com>
Date:   Fri Jun 13 14:20:13 2025 -0700

    drm/sched: Increment job count before swapping tail spsc queue
    
    A small race exists between spsc_queue_push and the run-job worker, in
    which spsc_queue_push may return not-first while the run-job worker has
    already idled due to the job count being zero. If this race occurs, job
    scheduling stops, leading to hangs while waiting on the job’s DMA
    fences.
    
    Seal this race by incrementing the job count before appending to the
    SPSC queue.
    
    This race was observed on a drm-tip 6.16-rc1 build with the Xe driver in
    an SVM test case.
    
    Fixes: 1b1f42d8fde4 ("drm: move amd_gpu_scheduler into common location")
    Fixes: 27105db6c63a ("drm/amdgpu: Add SPSC queue to scheduler.")
    Cc: stable at vger.kernel.org
    Signed-off-by: Matthew Brost <matthew.brost at intel.com>
    Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
+ /mt/dim checkpatch 4d016d6e602638e0ebc3895331224e057508c07a drm-intel
639634fe6da1 drm/sched: Increment job count before swapping tail spsc queue
-:37: WARNING:MEMORY_BARRIER: memory barrier without comment
#37: FILE: include/drm/spsc_queue.h:74:
+	smp_mb__after_atomic();

total: 0 errors, 1 warnings, 0 checks, 12 lines checked




More information about the Intel-xe mailing list