From: Philip Yang <Philip.Yang@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <Felix.Kuehling@amd.com>, <christian.koenig@amd.com>,
<Kent.Russell@amd.com>, <Andrew.Martin@amd.com>,
Philip Yang <Philip.Yang@amd.com>
Subject: [PATCH v2 0/2] drm/amdgpu: per-PTE MTYPE override for NUMA locality
Date: Mon, 20 Apr 2026 09:37:03 -0400 [thread overview]
Message-ID: <20260420133705.3721315-1-Philip.Yang@amd.com> (raw)
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(-)
--
2.50.1
next reply other threads:[~2026-04-20 13:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 13:37 Philip Yang [this message]
2026-04-20 13:37 ` [PATCH v2 1/2] drm/amdgpu: Move amdgpu_device_check_iommu_direct_map() earlier Philip Yang
2026-04-27 11:19 ` Christian König
2026-04-20 13:37 ` [PATCH v2 2/2] drm/amdgpu: move VM PTE MTYPE override to per-PTE granularity Philip Yang
2026-04-27 11:23 ` Christian König
2026-04-22 18:00 ` [PATCH v2 0/2] drm/amdgpu: per-PTE MTYPE override for NUMA locality Philip Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260420133705.3721315-1-Philip.Yang@amd.com \
--to=philip.yang@amd.com \
--cc=Andrew.Martin@amd.com \
--cc=Felix.Kuehling@amd.com \
--cc=Kent.Russell@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox