Xe is currently the only TTM driver that drives the TTM shrinker, and hence the only user of TTM's incremental swap path. That path splits the pool's higher-order compound folios one page at a time via folio_split_driver_managed() so individual pages can be backed up to shmem and freed under memory pressure.
folio_split_driver_managed() is part of the transparent hugepage split machinery in mm/huge_memory.c, which is only built when CONFIG_TRANSPARENT_HUGEPAGE is enabled. Select it from DRM_XE so the split primitive is always available for the driver that needs it, rather than forcing it on every TTM user. Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: David Airlie <[email protected]> Cc: Simona Vetter <[email protected]> Cc: Christian Koenig <[email protected]> Cc: Huang Rui <[email protected]> Cc: Matthew Auld <[email protected]> Cc: Matthew Brost <[email protected]> Cc: Andrew Morton <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Lorenzo Stoakes <[email protected]> Cc: Zi Yan <[email protected]> Cc: Baolin Wang <[email protected]> Cc: "Liam R. Howlett" <[email protected]> Cc: Nico Pache <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Dev Jain <[email protected]> Cc: Barry Song <[email protected]> Cc: Lance Yang <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Matthew Brost <[email protected]> Assisted-by: GitHub-Copilot:claude-opus-4.8 --- drivers/gpu/drm/xe/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 4d7dcaff2b91..88a4f3d09d5f 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -11,6 +11,12 @@ config DRM_XE # the shmem_readpage() which depends upon tmpfs select SHMEM select TMPFS + # Xe is the only TTM driver that exercises the TTM shrinker's + # incremental swap path, which splits the pool's compound folios one + # page at a time via folio_split_driver_managed(). That helper lives + # in the THP split machinery, so pull it in here rather than for all + # TTM users. + select TRANSPARENT_HUGEPAGE select DRM_BUDDY select DRM_CLIENT_SELECTION select DRM_KMS_HELPER -- 2.34.1
