All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Huang, Honglei" <honghuan@amd.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: "Simona Vetter" <simona@ffwll.ch>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Kuehling, Felix" <felix.kuehling@amd.com>,
	"Huang Rui" <ray.huang@amd.com>,
	dri-devel@lists.freedesktop.org,
	"Honglei Huang" <honglei1.huang@amd.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Alice Ryhl" <aliceryhl@google.com>
Subject: Re: About NUMA support in drmsvm helpers
Date: Tue, 24 Nov 2026 14:55:32 +0800	[thread overview]
Message-ID: <3c762d0c-ef16-4e3e-af96-fd65fc492db5@amd.com> (raw)
In-Reply-To: <c844403b-8c07-4a37-a988-85d2548bb674@amd.com>



On 11/23/2026 7:04 PM, Christian König wrote:
> Hi Honglei,
> 
> On 11/23/26 11:44, Huang, Honglei wrote:
>>
>> Hi all,
>>
>> A NUMA issue is found in another thread in [1]
>>
>> We also encountered a similar issue, performance drop occurs when NUMA balance is enabled.
>>
>> And there is one more thing about NUMA:
>> The current amdgpu drmsvm can specify system memory as a destination, but not a specific CPU NUMA node.
> 
> Yeah I think that is by design. the NUMA node a page ends up when being migrated back from VRAM to system memory should be determined by the original backing store/address space and not the driver who migrates it back.
> 
> In other words when applications said that it wants their buffers to be placed on node X it is not up to the driver to mess with that.
> 
>> This has impact on some platforms like MI300A that feature unified memory for CPU and GPU.  We did a test for 2GB memory accessing in node
>> 0 and node 3. GPU read/write bandwidth averaged about 2.78 TB/s with local pages and 103 GB/s with remote pages, it differs a lot.
>>
>> There is a requirement from AMD HIP to specify certain SVM memory to specific NUMA nodes. But KFD also can not support NUMA fully. So the HIP runtime have to use linux NUMA facilities to move memory to the correct NUMA node, this could lead to unnecessary ram to ram migration.
>> And it also can not solve VRAM to RAM evict to error NUMA node issue.
>>
>> Would it make sense for drm_gpusvm helpers to let a caller pass a preferred NUMA node by interface? An explicit destination node for migration to system memory.
> 
> I think we just need to make sure that the NUMA preferences of the process and any setting specified by madvise() and co are taken into account.
> 

So we should reuse existing MM mechanisms and respect application NUMA 
policies, right?
Some changes may still be needed to cover the remaining gaps, and needs 
do some test to verify the NUMA feature.

Regards,
Honglei


> Regards,
> Christian.
> 
>>
>> [1]: https://lore.kernel.org/all/b32fb02a-68b4-4db9-83dd-254147dbf215@kernel.org/
>>
>> Regards,
>> Honglei
> 


  reply	other threads:[~2026-11-24  6:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 10:44 About NUMA support in drmsvm helpers Huang, Honglei
2026-11-23 11:04 ` Christian König
2026-11-24  6:55   ` Huang, Honglei [this message]
2026-11-24 13:54     ` Thomas Hellström
2026-11-25  6:23       ` Huang, Honglei

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=3c762d0c-ef16-4e3e-af96-fd65fc492db5@amd.com \
    --to=honghuan@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=aliceryhl@google.com \
    --cc=christian.koenig@amd.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felix.kuehling@amd.com \
    --cc=honglei1.huang@amd.com \
    --cc=matthew.brost@intel.com \
    --cc=ray.huang@amd.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.