OSDN Git Service

drm/i915: Break up error capture compression loops with cond_resched()
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Sep 2020 09:00:58 +0000 (10:00 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 30 Sep 2020 18:24:30 +0000 (14:24 -0400)
commit7d5553147613b50149238ac1385c60e5c7cacb34
tree5545a0b756c605f653e2036ceffa4fc55fa69772
parenteb2a27086a821a7993c5a3230022c85cc7ccfbda
drm/i915: Break up error capture compression loops with cond_resched()

As the error capture will compress user buffers as directed to by the
user, it can take an arbitrary amount of time and space. Break up the
compression loops with a call to cond_resched(), that will allow other
processes to schedule (avoiding the soft lockups) and also serve as a
warning should we try to make this loop atomic in the future.

Testcase: igt/gem_exec_capture/many-*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200916090059.3189-2-chris@chris-wilson.co.uk
(cherry picked from commit 293f43c80c0027ff9299036c24218ac705ce584e)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/i915_gpu_error.c