• A
    drm/amdkfd: Add perf counters to topology · f4757347
    Amber Lin 提交于
    For hardware blocks whose performance counters are accessed via MMIO
    registers, KFD provides the support for those privileged blocks.
    
    IOMMU is one of those privileged blocks. Most performance counter properties
    required by Thunk are available at /sys/bus/event_source/devices/amd_iommu.
    
    This patch adds properties to topology in KFD sysfs for information not
    available in /sys/bus/event_source/devices/amd_iommu. They are shown at
    /sys/devices/virtual/kfd/kfd/topology/nodes/0/perf/iommu/ formatted as
    /sys/devices/virtual/kfd/kfd/topology/nodes/0/perf/<block>/<property>, i.e.
    /sys/devices/virtual/kfd/kfd/topology/nodes/0/perf/iommu/max_concurrent.
    
    For dGPUs, who don't have IOMMU, nothing appears under
    /sys/devices/virtual/kfd/kfd/topology/nodes/0/perf.
    Signed-off-by: NAmber Lin <Amber.Lin@amd.com>
    Signed-off-by: NKent Russell <kent.russell@amd.com>
    Signed-off-by: NFelix Kuehling <Felix.Kuehling@amd.com>
    Reviewed-by: NOded Gabbay <oded.gabbay@gmail.com>
    Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
    f4757347
kfd_topology.h 5.6 KB