]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe: Don't unnecessarily invoke the OOM killer on multiple binds
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 31 Oct 2024 15:37:32 +0000 (16:37 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 1 Nov 2024 15:59:48 +0000 (16:59 +0100)
commit1a7b71805a3051ae04dde1307a6eecedaca857b8
tree4fd75b5df0452e04cfcd28ffe6877a7c174bd1ff
parent6bd49cc1a8924c3fe9554526f2d42d8d8851aea9
drm/xe: Don't unnecessarily invoke the OOM killer on multiple binds

Multiple single-ioctl binds can be split up into multiple bind
ioctls, reducing the memory required to hold the bind array.

So rather than allowing the OOM killer to be invoked, return
-ENOMEM or -ENOBUFS to user-space to take corrective action.

v2:
- Add __GFP_NOWARN to __GFP_RETRY_MAYFAIL allocations to avoid
  spamming the kernel log if a recoverable allocation fails.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2701
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241031153732.164995-3-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/xe/xe_vm.c