History

drm/amdkfd: add smi events for process start and end

rocm-smi will be able to show the events for KFD process start/end, it is the implementation of this feature.

Eric Huang committed 1 year ago

Commit 4172b551 parent 1d9bff44 files · +31 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/kfd_ioctl.h+5−0
@@ -536,6 +536,8 @@ enum kfd_smi_event { · 535 unmodified lines
536 KFD_SMI_EVENT_QUEUE_EVICTION = 9,536 KFD_SMI_EVENT_QUEUE_EVICTION = 9,
537 KFD_SMI_EVENT_QUEUE_RESTORE = 10,537 KFD_SMI_EVENT_QUEUE_RESTORE = 10,
538 KFD_SMI_EVENT_UNMAP_FROM_GPU = 11,538 KFD_SMI_EVENT_UNMAP_FROM_GPU = 11,
539 KFD_SMI_EVENT_PROCESS_START = 12,
540 KFD_SMI_EVENT_PROCESS_END = 13,
539 541
540 /*542 /*
541 * max event number, as a flag bit to get events from all processes,543 * max event number, as a flag bit to get events from all processes,
@@ -651,6 +653,9 @@ struct kfd_ioctl_smi_events_args { · 109 unmodified lines
651 "%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size),\653 "%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size),\
652 (node), (unmap_trigger)654 (node), (unmap_trigger)
653 655
656#define KFD_EVENT_FMT_PROCESS(pid, task_name)\
657 "%x %s\n", (pid), (task_name)
658
654/**************************************************************************************************659/**************************************************************************************************
655 * CRIU IOCTLs (Checkpoint Restore In Userspace)660 * CRIU IOCTLs (Checkpoint Restore In Userspace)
656 *661 *