drm/amdkfd: Add queue information to sysfs
authorAmber Lin <Amber.Lin@amd.com>
Thu, 30 Jan 2020 05:08:05 +0000 (00:08 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Feb 2020 20:04:38 +0000 (15:04 -0500)
commit6d220a7e7971ecabdf713554df44aca5640efb33
tree3b096959a70db4f4b277d21b3ba4f27602816324
parent896dace8eca843100bef9b7482c3d6243b4601fb
drm/amdkfd: Add queue information to sysfs

Provide compute queues information in sysfs under /sys/class/kfd/kfd/proc.
The format is /sys/class/kfd/kfd/proc/<pid>/queues/<queue id>/XX where
XX are size, type, and gpuid three files to represent queue size, queue
type, and the GPU this queue uses. <queue id> folder and files underneath
are generated when a queue is created. They are removed when the queue is
destroyed.

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c