drm/i915/selftests: Take a breath during check_partial_mappings()
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 2 Jan 2019 11:44:31 +0000 (11:44 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 2 Jan 2019 12:17:09 +0000 (12:17 +0000)
With kasan on a slow machine, it can take an age to check all the
partial mappings in a single iteration, so break it up with a
cond_resched) to avoid RCU stall reports.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190102114431.23022-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/i915_gem_object.c

index c3999dd2021e4b76816a50ab0df6396205df5e2b..be7ecb66ad11392bf3162447ef45e3ca4edd5122 100644 (file)
@@ -238,6 +238,7 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj,
                u32 *cpu;
 
                GEM_BUG_ON(view.partial.size > nreal);
+               cond_resched();
 
                err = i915_gem_object_set_to_gtt_domain(obj, true);
                if (err) {