linux_dsm_epyc7002/drivers/gpu/drm/i915/selftests
Chris Wilson c9a6462288 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: a2bf92e8cc ("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
2019-01-29 20:00:05 +00:00
..
huge_gem_object.c
huge_gem_object.h
huge_pages.c drm/i915/selftests: Query the vm under test for hugepage support 2019-01-18 09:07:06 +00:00
i915_gem_coherency.c drm/i915/selftests: Mark up rpm wakerefs 2019-01-14 16:18:20 +00:00
i915_gem_context.c drm/i915/selftests: Refactor common live_test framework 2019-01-22 13:01:20 +00:00
i915_gem_dmabuf.c
i915_gem_evict.c drm/i915: Pull VM lists under the VM mutex. 2019-01-28 16:24:13 +00:00
i915_gem_gtt.c drm/i915: Pull VM lists under the VM mutex. 2019-01-28 16:24:13 +00:00
i915_gem_object.c drm/i915: Syntatic sugar for using intel_runtime_pm 2019-01-14 16:18:25 +00:00
i915_gem.c drm/i915: Syntatic sugar for using intel_runtime_pm 2019-01-14 16:18:25 +00:00
i915_live_selftests.h drm/i915: Allocate a status page for each timeline 2019-01-28 19:07:02 +00:00
i915_mock_selftests.h drm/i915: Allocate a status page for each timeline 2019-01-28 19:07:02 +00:00
i915_random.c drm/i915: Share per-timeline HWSP using a slab suballocator 2019-01-28 19:07:06 +00:00
i915_random.h drm/i915: Share per-timeline HWSP using a slab suballocator 2019-01-28 19:07:06 +00:00
i915_request.c drm/i915/selftests: Refactor common live_test framework 2019-01-22 13:01:20 +00:00
i915_selftest.c drm/i915/selftests: Apply a subtest filter 2019-01-29 19:59:57 +00:00
i915_sw_fence.c
i915_syncmap.c
i915_timeline.c drm/i915: Track the context's seqno in its own timeline HWSP 2019-01-28 19:07:09 +00:00
i915_vma.c drm/i915: Move vma lookup to its own lock 2019-01-28 16:24:16 +00:00
igt_flush_test.c
igt_flush_test.h
igt_live_test.c drm/i915/selftests: Refactor common live_test framework 2019-01-22 13:01:20 +00:00
igt_live_test.h drm/i915/selftests: Refactor common live_test framework 2019-01-22 13:01:20 +00:00
igt_reset.c drm/i915/selftests: Add tests for GT and engine workaround verification 2018-12-04 12:23:19 +00:00
igt_reset.h drm/i915/selftests: Add tests for GT and engine workaround verification 2018-12-04 12:23:19 +00:00
igt_spinner.c drm/i915/selftests: Reorder request allocation vs vma pinning 2018-12-04 17:53:19 +00:00
igt_spinner.h
igt_wedge_me.h
intel_breadcrumbs.c
intel_engine_cs.c
intel_guc.c drm/i915/selftests: Mark up rpm wakerefs 2019-01-14 16:18:20 +00:00
intel_hangcheck.c drm/i915: Issue engine resets onto idle engines 2019-01-25 14:27:30 +00:00
intel_lrc.c drm/i915/execlists: Suppress preempting self 2019-01-29 20:00:05 +00:00
intel_uncore.c
intel_workarounds.c drm/i915: Remove GPU reset dependence on struct_mutex 2019-01-25 14:27:22 +00:00
lib_sw_fence.c
lib_sw_fence.h
mock_context.c drm/i915: Refactor out intel_context_init() 2019-01-22 13:13:53 +00:00
mock_context.h
mock_dmabuf.c
mock_dmabuf.h
mock_drm.c
mock_drm.h
mock_engine.c drm/i915: Identify active requests 2019-01-29 19:59:59 +00:00
mock_engine.h
mock_gem_device.c drm/i915: Move list of timelines under its own lock 2019-01-28 16:24:22 +00:00
mock_gem_device.h
mock_gem_object.h
mock_gtt.c drm/i915/selftests: Create a clean GGTT for vma/gtt selftesting 2019-01-22 12:50:39 +00:00
mock_gtt.h drm/i915/selftests: Create a clean GGTT for vma/gtt selftesting 2019-01-22 12:50:39 +00:00
mock_request.c
mock_request.h
mock_timeline.c drm/i915: Move list of timelines under its own lock 2019-01-28 16:24:22 +00:00
mock_timeline.h
mock_uncore.c
mock_uncore.h
scatterlist.c