[Intel-gfx] [PATCH] drm/i915: avoid big kmallocs on reading error state
Chris Wilson
chris at chris-wilson.co.uk
Wed May 22 15:58:46 CEST 2013
On Wed, May 22, 2013 at 04:42:53PM +0300, Mika Kuoppala wrote:
> Sometimes when user is trying to get error state out from
> debugfs after gpu hang, the memory is low and/or fragmented
> enough that kmalloc in seq_file will fail.
>
> Prevent big kmalloc by avoiding seq_file and instead convert
> error state to string in smaller chunks.
>
> v2: better alloc flags, better truncate, correct
> locking, and error handling improvements (Chris Wilson)
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
I am reasonably happy with this. Every attempt to see how we might
shoe-horn iterating over the error state with seq_file has so far been
overly complicated, and the only benefit it may bring is the focus on
iterating at a higher level than characters.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list