]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit578345534646cea90ab7b6a17e321172416bd6b6
tree02f04882d76ef83aae5255088851e5d278289796
parenta04986b62196913dc67b4871d1498049fb78bcc6
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