drm/i915/selftests: Disable shrinker across mmap-exhaustion

For mmap-exhaustion, we deliberately put the system under a large amount
of pressure to ensure that we are able to reap mmap-offsets from dead
objects. If background activity does that reaping for us, that defeats
the purpose of the test and in some cases will fail our sanity checks
(because of the fake activity we use to prevent the idle worker).

Fixes: 932cac10c8 ("drm/i915/selftests: Prevent background reaping of acti
ve objects")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181011103748.18387-1-chris@chris-wilson.co.uk
(cherry picked from commit 0b4bf7ca9b)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Chris Wilson 2018-10-11 11:37:48 +01:00 коммит произвёл Rodrigo Vivi
Родитель 0414444588
Коммит e3118a038d
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -501,6 +501,8 @@ static bool assert_mmap_offset(struct drm_i915_private *i915,
static void disable_retire_worker(struct drm_i915_private *i915) static void disable_retire_worker(struct drm_i915_private *i915)
{ {
i915_gem_shrinker_unregister(i915);
mutex_lock(&i915->drm.struct_mutex); mutex_lock(&i915->drm.struct_mutex);
if (!i915->gt.active_requests++) { if (!i915->gt.active_requests++) {
intel_runtime_pm_get(i915); intel_runtime_pm_get(i915);
@ -613,6 +615,7 @@ out_park:
else else
queue_delayed_work(i915->wq, &i915->gt.idle_work, 0); queue_delayed_work(i915->wq, &i915->gt.idle_work, 0);
mutex_unlock(&i915->drm.struct_mutex); mutex_unlock(&i915->drm.struct_mutex);
i915_gem_shrinker_register(i915);
return err; return err;
err_obj: err_obj:
i915_gem_object_put(obj); i915_gem_object_put(obj);