]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use fault-injection to force the shrinker to run in live GTT tests
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Feb 2017 17:15:44 +0000 (17:15 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Feb 2017 20:46:32 +0000 (20:46 +0000)
commita46ddd7d04cb15269ca40b8ac0bafca29beda250
treef68b0859db6065d9ad2b23df503606df3ac1787d
parent603145c3986b410c7d3eec16fae0e382a8724def
drm/i915: Use fault-injection to force the shrinker to run in live GTT tests

It is possible whilst allocating the page-directory tree for a ppgtt
bind that the shrinker may run and reap unused parts of the tree. If the
shrinker happens to remove a chunk of the tree that the
allocate_va_range has already processed, we may then try to insert into
the dangling tree. This test uses the fault-injection framework to force
the shrinker to be invoked before we allocate new pages, i.e. new chunks
of the PD tree.

References: https://bugs.freedesktop.org/show_bug.cgi?id=99295
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
drivers/gpu/drm/i915/Kconfig.debug
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_selftest.h
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c