Re: [PATCH 1/4] drm/i915/gt: Always reset the timeslice after a context switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 13/01/2020 10:44, Chris Wilson wrote:
Currently, we reset the timer after a pre-eemption event. This has the
side-effect that the timeslice runs into the second context after the
first is completed. To be more fair, we want to reset the clock after
promotion as well.

You mean after completion? If so then it makes sense to me.
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
  drivers/gpu/drm/i915/gt/intel_lrc.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 9af1b2b493f4..a6ac37dece0a 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -2285,7 +2285,6 @@ static void process_csb(struct intel_engine_cs *engine)
/* Point active to the new ELSP; prevent overwriting */
  			WRITE_ONCE(execlists->active, execlists->pending);
-			set_timeslice(engine);
if (!inject_preempt_hang(execlists))
  				ring_set_paused(engine, 0);
@@ -2325,6 +2324,9 @@ static void process_csb(struct intel_engine_cs *engine)
  		}
  	} while (head != tail);
+ if (execlists_active(execlists))
+		set_timeslice(engine);
+
  	execlists->csb_head = head;
/*


Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux