drm/i915/execlist: Trim immediate timeslice expiry
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Oct 2019 10:08:51 +0000 (11:08 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Oct 2019 13:05:45 +0000 (14:05 +0100)
commit2229adc81380c46908d46a91f05a6c1650456769
tree8c4b4c983fb55af0fb6a0b6ceeecc647de93793a
parent8574685547bdc4f11cc528f386e5396212409f9c
drm/i915/execlist: Trim immediate timeslice expiry

We perform timeslicing immediately upon receipt of a request that may be
put into the second ELSP slot. The idea behind this was that since we
didn't install the timer if the second ELSP slot was empty, we would not
have any idea of how long ELSP[0] had been running and so giving the
newcomer a chance on the GPU was fair. However, this causes us extra
busy work that we may be able to avoid if we wait a jiffie for the first
timeslice as normal.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191016100851.4979-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_engine_cs.c
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/i915_gem.h