Hi Mario,

This wouldn't work when we change compute and/or memory partitions. After a 
partition switch we need to recreate all the nodes. If you have an instinct 
machine you can try changing partitions 

$ rocm-smi --setcomputepartition CPX

Best Regards,
Harish





________________________________________
From: amd-gfx <[email protected]> on behalf of Mario 
Limonciello (AMD) <[email protected]>
Sent: Wednesday, December 10, 2025 3:15 PM
To: [email protected] <[email protected]>
Cc: Mario Limonciello (AMD) <[email protected]>
Subject: [PATCH v2 2/3] amdkfd: Don't rebuild node tree when calling 
kfd_topology_update_sysfs()


There is no need to remove all the nodes and rebuild them.  The content

will be the same.  Instead check whether the node was created and skip

the creation.



Signed-off-by: Mario Limonciello (AMD) <[email protected]>

---

 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 6 ++----

 1 file changed, 2 insertions(+), 4 deletions(-)



diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c

index a0990dd2378c1..b65f29294e2d6 100644

--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c

+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c

@@ -650,8 +650,8 @@ static int kfd_build_sysfs_node_entry(struct 
kfd_topology_device *dev,

         uint32_t i, num_attrs;

         struct attribute **attrs;

 

-       if (WARN_ON(dev->kobj_node))

-               return -EEXIST;

+       if (dev->kobj_node)

+               return 0;

 

         /*

          * Creating the sysfs folders

@@ -888,8 +888,6 @@ static int kfd_topology_update_sysfs(void)

                         return ret;

         }

 

-       kfd_remove_sysfs_node_tree();

-

         return kfd_build_sysfs_node_tree();

 }

 

--

2.43.0



Reply via email to