OSDN Git Service

drm/i915: Don't dump umpteen thousand requests
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Apr 2018 08:16:00 +0000 (09:16 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Apr 2018 13:00:37 +0000 (14:00 +0100)
commit56021f48dbea69a00b96a53d6450b0950f9c811f
treebcf16f39f8e0514f4060552ea0d5206d2ed36940
parent247870ac8ea72916cd26f89e9bc211b97141ecd5
drm/i915: Don't dump umpteen thousand requests

If we have more than a few, possibly several thousand request in the
queue, don't show the central portion, just the first few and the last
being executed and/or queued. The first few should be enough to help
identify a problem in execution, and most often comparing the first/last
in the queue is enough to identify problems in the scheduling.

We may need some fine tuning to set MAX_REQUESTS_TO_SHOW for common
debug scenarios, but for the moment if we can avoiding spending more
than a few seconds dumping the GPU state that will avoid a nasty
livelock (where hangcheck spends so long dumping the state, it fires
again and starts to dump the state again in parallel, ad infinitum).

v2: Remember to print last not the stale rq iter after the loop.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180424081600.27544-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_engine_cs.c