summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilip Yang <Philip.Yang@amd.com>2024-07-30 22:33:23 +0300
committerAlex Deucher <alexander.deucher@amd.com>2024-10-07 21:32:23 +0300
commita3ab2d45b9887ee609cd3bea39f668236935774c (patch)
tree006db690b926d9bd51fe643685d3671064076e2c /include
parent012be6f22c01e25c995c30f1f178ac11820dfb65 (diff)
downloadlinux-a3ab2d45b9887ee609cd3bea39f668236935774c.tar.xz
drm/amdkfd: SMI report dropped event count
Add new SMI event to report the dropped event count. When the event kfifo is full, drop count is not zero, or no enough space left to store the event message, increase drop count. After reading event out from kfifo, if event was dropped, drop_count is not zero, generate a dropped event record and reset drop count to zero. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: James Zhu <James.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/kfd_ioctl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index fa9f9846b88e..7afd66d45313 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -530,6 +530,7 @@ enum kfd_smi_event {
KFD_SMI_EVENT_QUEUE_EVICTION = 9,
KFD_SMI_EVENT_QUEUE_RESTORE = 10,
KFD_SMI_EVENT_UNMAP_FROM_GPU = 11,
+ KFD_SMI_EVENT_DROPPED_EVENT = 12,
/*
* max event number, as a flag bit to get events from all processes,
@@ -610,6 +611,7 @@ struct kfd_ioctl_smi_events_args {
* rw: 'W' for write page fault, 'R' for read page fault
* rescheduled: 'R' if the queue restore failed and rescheduled to try again
* error_code: migrate failure error code, 0 if no error
+ * drop_count: how many events dropped when fifo is full
*/
#define KFD_EVENT_FMT_UPDATE_GPU_RESET(reset_seq_num, reset_cause)\
"%x %s\n", (reset_seq_num), (reset_cause)
@@ -645,6 +647,10 @@ struct kfd_ioctl_smi_events_args {
"%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size),\
(node), (unmap_trigger)
+#define KFD_EVENT_FMT_DROPPED_EVENT(ns, pid, drop_count)\
+ "%lld -%d %d\n", (ns), (pid), (drop_count)
+
+
/**************************************************************************************************
* CRIU IOCTLs (Checkpoint Restore In Userspace)
*