]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/ttm: Avoid invoking the OOM killer when reading back swapped content
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 17 Mar 2026 14:18:55 +0000 (15:18 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 20 Mar 2026 09:38:10 +0000 (10:38 +0100)
commitc6135f67aa37a4a744869f726d706bda091e6dfa
tree80effcbaa7bce4213ba0446ea6f164fe4285e197
parent55fcf74cc2330580659426a57d1fa0125f7326b3
drm/ttm: Avoid invoking the OOM killer when reading back swapped content

In situations where the system is very short on RAM, the shmem
readback from swap-space may invoke the OOM killer.

However, since this might be a recoverable situation where the caller
is indicating this by setting
struct ttm_operation_ctx::gfp_retry_mayfail to true, adjust the gfp
value used by the allocation accordingly.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Maarten Lankhorst <dev@lankhorst.se>
Acked-by: Christian König <christian.koening@amd.com>
Link: https://patch.msgid.link/20260317141856.237876-3-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/ttm/ttm_backup.c
drivers/gpu/drm/ttm/ttm_pool.c
include/drm/ttm/ttm_backup.h