[First four patches are just my queue to avoid conflicts. I am still hoping I can bring them in a state where all is good since all these together simplify things.]
So as requested by Philipp and as the title says - replacing the SPSC queue with a list and a spinlock. A first cut which passes unit tests and smoke testing on AMD. But it wasn't easy, since we can't really get away from some of the deeply ingrained scheduler design points. Patches 5 and 6 are where the action is at so please focus there first. Please have a look and see what you think. Cc: Christian König <[email protected]> Cc: Danilo Krummrich <[email protected]> Cc: Matthew Brost <[email protected]> Cc: Philipp Stanner <[email protected]> Tvrtko Ursulin (7): drm/sched: Disallow initializing entities with un-initialized schedulers drm/sched: Ignore stopped entity attempt to change its run-queue drm/sched: Replace completion with a flush drm/sched: Remove the single scheduler special case drm/amdgpu: Rework the amdgpu_job_stop_all_jobs_on_sched() hack drm/sched: Replace the SPSC queue with a list and a spinlock drm/sched: Address the fence_seq fixme drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 110 ++++++++++--- .../gpu/drm/scheduler/gpu_scheduler_trace.h | 2 +- drivers/gpu/drm/scheduler/sched_entity.c | 153 +++++++++++------- drivers/gpu/drm/scheduler/sched_fence.c | 6 +- drivers/gpu/drm/scheduler/sched_internal.h | 70 ++++---- drivers/gpu/drm/scheduler/sched_main.c | 56 ++----- drivers/gpu/drm/scheduler/sched_rq.c | 77 +++++++-- .../gpu/drm/scheduler/tests/tests_scheduler.c | 2 +- include/drm/gpu_scheduler.h | 85 +++++----- include/drm/spsc_queue.h | 124 -------------- 10 files changed, 349 insertions(+), 336 deletions(-) delete mode 100644 include/drm/spsc_queue.h -- 2.56.0
