diff options
| author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2025-12-19 12:33:03 +0100 |
|---|---|---|
| committer | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2025-12-23 09:37:33 +0100 |
| commit | 77f14f2f2d73f6955b856e7c91ca9fb7046da191 (patch) | |
| tree | 6612a0aa4e84b81e9a8b5e6f0dc2fd8f431f2de3 /drivers/gpu/drm/Makefile | |
| parent | a26084328ac40c12096ef01482a7520346379453 (diff) | |
| download | linux-next-77f14f2f2d73f6955b856e7c91ca9fb7046da191.tar.gz linux-next-77f14f2f2d73f6955b856e7c91ca9fb7046da191.zip | |
drm/pagemap: Add a drm_pagemap cache and shrinker
Pagemaps are costly to set up and tear down, and they consume a lot
of system memory for the struct pages. Ideally they should be
created only when needed.
Add a caching mechanism to allow doing just that: Create the drm_pagemaps
when needed for migration. Keep them around to avoid destruction and
re-creation latencies and destroy inactive/unused drm_pagemaps on memory
pressure using a shrinker.
Only add the helper functions. They will be hooked up to the xe driver
in the upcoming patch.
v2:
- Add lockdep checking for drm_pagemap_put(). (Matt Brost)
- Add a copyright notice. (Matt Brost)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> # For merging through drm-xe.
Link: https://patch.msgid.link/20251219113320.183860-8-thomas.hellstrom@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/Makefile')
| -rw-r--r-- | drivers/gpu/drm/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 0e1c668b46d2..0deee72ef935 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -109,7 +109,8 @@ obj-$(CONFIG_DRM_GPUVM) += drm_gpuvm.o drm_gpusvm_helper-y := \ drm_gpusvm.o\ - drm_pagemap.o + drm_pagemap.o\ + drm_pagemap_util.o obj-$(CONFIG_DRM_GPUSVM) += drm_gpusvm_helper.o obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o |
