Skip to content

drm/amdgpu: per-PTE MTYPE override for NUMA locality

Philip Yang amd-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 3 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/amdgpu: Move amdgpu_device_check_iommu_direct_map() earlierdrivers/gpu/drm/amd/amdgpu/amdgpu_device.c+3 -21 reply
2/2drm/amdgpu: move VM PTE MTYPE override to per-PTE granularitydrivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +4 more+41 -351 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchChristian König
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] drm/amdgpu: per-PTE MTYPE override for NUMA locality

This series refactors the NUMA-aware MTYPE override for VM page table entries on GFX 9.4.3 APUs (MI300A). Previously, the override was applied once per contiguous range in the centralized amdgpu_vm_pte_update_flags(), which missed scattered pages (pages_addr path) that could span multiple NUMA nodes.

Patch 1 moves amdgpu_device_check_iommu_direct_map() earlier in device init so that ram_is_direct_mapped is available when gmc_funcs are configured during IP early init.

Patch 2 moves the MTYPE override into the individual CPU and SDMA update backends at per-PTE granularity, enabling correct NUMA-local MTYPE selection for scattered pages. It also hoists the eligibility checks (APU type, IP version, direct-mapped RAM, multi-NUMA) from runtime to init time via a new gmc.override_pte flag, avoiding repeated checks on every PTE update.

Philip Yang (2):
drm/amdgpu: Move amdgpu_device_check_iommu_direct_map() earlier drm/amdgpu: move VM PTE MTYPE override to per-PTE granularity

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c  |  5 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h     |  2 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c      |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h      |  6 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c  | 11 ++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c   |  9 ------
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 11 ++++++-
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c       | 35 +++++++++------------
 8 files changed, 44 insertions(+), 37 deletions(-)
Signature · 1 line
2.50.1