drm: Reduce page tables overhead with THP
Status from this message: Queued to drm-misc-next.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v13 Latest10 patches 3 repliesApplied
- v1210 patches 2 repliesSuperseded
- v11 posting 2/21 of 10 patches 0 repliesSuperseded
Earlier versions · 10
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v11 posting 1/2 | 10 patches | 1 reply | Superseded | |
| v10 | 10 patches | 14 replies | Superseded | |
| v9 | 11 patches | 10 replies | Superseded | |
| v8 | 11 patches | 1 reply | Superseded | |
| v7 | 11 patches | 3 replies | Superseded | |
| v6 | 11 patches | 0 replies | Superseded | |
| v5 | 12 patches | 5 replies | Superseded | |
| v4 | 13 patches | 13 replies | Superseded | |
| v3 | 10 patches | 14 replies | Superseded | |
| v1 | 8 patches | 11 replies | Superseded |
Patches in v13 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | drm/shmem-helper: Simplify page offset calculation in fault handlerdrivers/ | +2 | 0 replies | |
| 2/10 | drm/shmem-helper: Map huge pages in fault handlerdrivers/ | +31 | 0 replies | |
| 3/10 | drm/gem: Introduce drm_gem_get_unmapped_area() fopdrivers/ include/ | +90 | 0 replies | |
| 4/10 | drm/gem: Add huge tmpfs mountpoint helpersdrivers/ include/ include/ | +105 | 0 replies | |
| 5/10 | drm/i915: Use huge tmpfs mountpoint helpersdrivers/ drivers/ drivers/ +4 more | +50 | 1 reply | |
| 6/10 | drm/v3d: Use huge tmpfs mountpoint helpersdrivers/ drivers/ drivers/ +3 more | +24 | 0 replies | |
| 7/10 | drm/gem: Get rid of *_with_mnt helpersdrivers/ drivers/ drivers/ +2 more | +19 | 1 reply | |
| 8/10 | drm/panthor: Introduce huge tmpfs mountpoint optiondrivers/ drivers/ drivers/ +2 more | +39 | 0 replies | |
| 9/10 | drm/panfrost: Introduce huge tmpfs mountpoint optiondrivers/ drivers/ drivers/ +2 more | +38 | 0 replies | |
| 10/10 | Documentation/gpu/drm-mm: Add THP paragraph to GEM mapping sectionDocumentation/ | +23 | 0 replies |
Reviews trailers per patch
All 10 patches have a Reviewed-by or Acked-by.
| Patch | Boris Brezillon | Maíra Canal | Tvrtko Ursulin | Bagas Sanjaya |
|---|---|---|---|---|
| 1/10 | R-b | |||
| 2/10 | R-b | |||
| 3/10 | R-b | |||
| 4/10 | R-b | R-b | ||
| 5/10 | A-b | |||
| 6/10 | R-b | R-b | ||
| 7/10 | R-b | R-b | ||
| 8/10 | R-b | |||
| 9/10 | R-b | |||
| 10/10 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v13 00/10] drm: Reduce page tables overhead with THP
This series aims to reduce the page tables overhead of DRM drivers for builds with CONFIG_TRANSPARENT_HUGEPAGE enabled and either the sysfs knob '/sys/kernel/mm/transparent_hugepage/shmem_enabled' appropriately set or drivers using a dedicated huge tmpfs mount point.
It starts by checking whether a faulty address in the page fault handler is part of a huge page in order to attempt a PMD sized PFN insertion into the VMA. It then introduces a dedicated get_unmapped_area file operation on the DRM file descriptor for GEM objects to get the best virtual address alignment for the underlying shmem buffers.
The remaining commits propose shmem helpers to create and release huge tmpfs mount points and adapt the i915 and V3D drivers. The helpers are then used to optionally enable Transparent Hugepage for Panfrost and Panthor.
For Panthor on a Rock 5B, this series makes the first memcpy() to an entire BO object mapped in userspace about twice as fast with Transparent Hugepage enabled.
Implementing a fault-around handler using the arm64 contiguous page hint (contptes) could also greatly help reduce page tables overhead for small pages by mapping several contiguous pages around a faulty address at once. This will be proposed in another patch series.
Loïc Molinari (10):
drm/shmem-helper: Simplify page offset calculation in fault handler drm/shmem-helper: Map huge pages in fault handler drm/gem: Introduce drm_gem_get_unmapped_area() fop drm/gem: Add huge tmpfs mountpoint helpers
drm/i915: Use huge tmpfs mountpoint helpers
drm/v3d: Use huge tmpfs mountpoint helpers
drm/gem: Get rid of *_with_mnt helpers
drm/panthor: Introduce huge tmpfs mountpoint option drm/panfrost: Introduce huge tmpfs mountpoint option Documentation/gpu/drm-mm: Add THP paragraph to GEM mapping section
Documentation/gpu/drm-mm.rst | 29 ++- drivers/gpu/drm/drm_gem.c | 202 +++++++++++++----- drivers/gpu/drm/drm_gem_shmem_helper.c | 77 +++---- drivers/gpu/drm/i915/Makefile | 3 +- .../gpu/drm/i915/gem/i915_gem_object_types.h | 9 +- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 58 +++-- drivers/gpu/drm/i915/gem/i915_gemfs.c | 71 ------ drivers/gpu/drm/i915/gem/i915_gemfs.h | 14 -- .../gpu/drm/i915/gem/selftests/huge_pages.c | 15 +- drivers/gpu/drm/i915/i915_drv.h | 5 - drivers/gpu/drm/panfrost/panfrost_device.c | 3 + drivers/gpu/drm/panfrost/panfrost_drv.c | 6 + drivers/gpu/drm/panfrost/panfrost_drv.h | 9 + drivers/gpu/drm/panfrost/panfrost_gem.c | 18 ++ drivers/gpu/drm/panfrost/panfrost_gem.h | 2 + drivers/gpu/drm/panthor/panthor_device.c | 3 + drivers/gpu/drm/panthor/panthor_drv.c | 7 + drivers/gpu/drm/panthor/panthor_drv.h | 9 + drivers/gpu/drm/panthor/panthor_gem.c | 18 ++ drivers/gpu/drm/panthor/panthor_gem.h | 2 + drivers/gpu/drm/v3d/Makefile | 3 +- drivers/gpu/drm/v3d/v3d_bo.c | 6 +- drivers/gpu/drm/v3d/v3d_drv.c | 2 +- drivers/gpu/drm/v3d/v3d_drv.h | 11 +- drivers/gpu/drm/v3d/v3d_gem.c | 21 +- drivers/gpu/drm/v3d/v3d_gemfs.c | 62 ------ include/drm/drm_device.h | 15 ++ include/drm/drm_gem.h | 40 +++- include/drm/drm_gem_shmem_helper.h | 3 - 29 files changed, 420 insertions(+), 303 deletions(-) delete mode 100644 drivers/gpu/drm/i915/gem/i915_gemfs.c delete mode 100644 drivers/gpu/drm/i915/gem/i915_gemfs.h create mode 100644 drivers/gpu/drm/panfrost/panfrost_drv.h create mode 100644 drivers/gpu/drm/panthor/panthor_drv.h delete mode 100644 drivers/gpu/drm/v3d/v3d_gemfs.c
Signature · 1 line
2.47.3