[PATCH 59/69] tiebreak

Chris Wilson chris at chris-wilson.co.uk
Mon Feb 1 01:39:34 UTC 2021


---
 drivers/gpu/drm/i915/i915_scheduler.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
index 1f9a22278f6e..de9c187290cd 100644
--- a/drivers/gpu/drm/i915/i915_scheduler.c
+++ b/drivers/gpu/drm/i915/i915_scheduler.c
@@ -746,6 +746,9 @@ static u64 signal_deadline(const struct i915_request *rq)
 		if (deadline == I915_DEADLINE_NEVER) /* retired & reused */
 			continue;
 
+		if (s->context == rq->context) /* break ties in favour of hot */
+			deadline--;
+
 		deadline = i915_sched_to_ns(deadline);
 		if (p->flags & I915_DEPENDENCY_WEAK)
 			deadline -= prio_slice(prio);
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list