From: Chris Wilson Date: Thu, 29 Aug 2019 17:08:48 +0000 (+0100) Subject: drm/i915/selftests: cond_resched() within the longer buddy tests X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e7b6affd0baef7b3c5e2acd94236093dcf437105;p=linux.git drm/i915/selftests: cond_resched() within the longer buddy tests Let the scheduler have a breather in between passes of the longer buddy tests. Important if we are running under kasan etc and this takes far longer than usual! Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190829170848.969-1-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/selftests/i915_buddy.c b/drivers/gpu/drm/i915/selftests/i915_buddy.c index 23f784eae1e7d..1b856bae67b53 100644 --- a/drivers/gpu/drm/i915/selftests/i915_buddy.c +++ b/drivers/gpu/drm/i915/selftests/i915_buddy.c @@ -375,6 +375,8 @@ retry: if (err) break; + + cond_resched(); } if (err == -ENOMEM) @@ -687,6 +689,8 @@ static int igt_buddy_alloc_range(void *arg) rem -= size; if (!rem) break; + + cond_resched(); } if (err == -ENOMEM)