drm/i915: Avoid allocating a page array for the gpu coredump
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Mon, 8 Nov 2021 17:45:44 +0000 (18:45 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 26 Nov 2021 07:26:08 +0000 (08:26 +0100)
commite45b98ba627691c6b577244abfdb18ef2621fea3
tree02f04882d76ef83aae5255088851e5d278289796
parent5c2625c4a08cf9b19cd070c1b30c75c9e5317853
drm/i915: Avoid allocating a page array for the gpu coredump

The gpu coredump typically takes place in a dma_fence signalling
critical path, and hence can't use GFP_KERNEL allocations, as that
means we might hit deadlocks under memory pressure. However
changing to __GFP_KSWAPD_RECLAIM which will be done in an upcoming
patch will instead mean a lower chance of the allocation succeeding.
In particular large contigous allocations like the coredump page
vector.
Remove the page vector in favor of a linked list of single pages.
Use the page lru list head as the list link, as the page owner is
allowed to do that.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211108174547.979714-2-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_gpu_error.h