Set NUMA region to 0 when using GTTAccess flag

When allocating memory for MES AQL queue structure, the PreferredNode
is set to the device index of GPU to hint the location where the BO
needs to be created. But we need to ignore the device index when calling
bind_mem_to_numa.

Change-Id: Iae69fe02bfd48c5a3bd495319f6f2706d6e8aea2
Αυτή η υποβολή περιλαμβάνεται σε:
David Yat Sin
2024-03-29 17:11:21 +00:00
γονέας fa0c182325
υποβολή 541d0dbbae
+2 -2
Προβολή Αρχείου
@@ -161,8 +161,8 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtAllocMemory(HSAuint32 PreferredNode,
if (zfb_support && gpu_id && MemFlags.ui32.NonPaged == 1)
MemFlags.ui32.CoarseGrain = 1;
*MemoryAddress = fmm_allocate_host(gpu_id, PreferredNode, *MemoryAddress,
SizeInBytes, MemFlags);
*MemoryAddress = fmm_allocate_host(gpu_id, MemFlags.ui32.GTTAccess ? 0 : PreferredNode,
*MemoryAddress, SizeInBytes, MemFlags);
if (!(*MemoryAddress)) {
pr_err("[%s] failed to allocate %lu bytes from host\n",