summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Wilson2019-01-29 19:54:52 +0100
committerChris Wilson2019-01-29 21:00:05 +0100
commitc9a646228816efeeacb05cc9400464ad8aa90017 (patch)
tree51bd004f039bdc5b06a07181ce1436d98a42ce70 /include
parentdrm/i915: Rename execlists->queue_priority to queue_priority_hint (diff)
downloadkernel-qcow2-linux-c9a646228816efeeacb05cc9400464ad8aa90017.tar.gz
kernel-qcow2-linux-c9a646228816efeeacb05cc9400464ad8aa90017.tar.xz
kernel-qcow2-linux-c9a646228816efeeacb05cc9400464ad8aa90017.zip
drm/i915/execlists: Suppress preempting self
In order to avoid preempting ourselves, we currently refuse to schedule the tasklet if we reschedule an inflight context. However, this glosses over a few issues such as what happens after a CS completion event and we then preempt the newly executing context with itself, or if something else causes a tasklet_schedule triggering the same evaluation to preempt the active context with itself. However, when we avoid preempting ELSP[0], we still retain the preemption value as it may match a second preemption request within the same time period that we need to resolve after the next CS event. However, since we only store the maximum preemption priority seen, it may not match the subsequent event and so we should double check whether or not we actually do need to trigger a preempt-to-idle by comparing the top priorities from each queue. Later, this gives us a hook for finer control over deciding whether the preempt-to-idle is justified. The sequence of events where we end up preempting for no avail is: 1. Queue requests/contexts A, B 2. Priority boost A; no preemption as it is executing, but keep hint 3. After CS switch, B is less than hint, force preempt-to-idle 4. Resubmit B after idling v2: We can simplify a bunch of tests based on the knowledge that PI will ensure that earlier requests along the same context will have the highest priority. v3: Demonstrate the stale preemption hint with a selftest References: a2bf92e8cc16 ("drm/i915/execlists: Avoid kicking priority on the current context") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190129185452.20989-4-chris@chris-wilson.co.uk
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions