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.

Regards,
Christian.

> 
> [1]: 
> https://lore.kernel.org/all/[email protected]/
> 
> Regards,
> Honglei

Reply via email to