Commit 819ec5ac authored by Felix Kuehling's avatar Felix Kuehling Committed by Alex Deucher

drm/amdkfd: Print a warning when the runlist becomes oversubscribed

Oversubscription of queues or processes results in poor performance
mostly because HWS blinbly schedules busy and idle queues, resulting
in poor occupancy if many queues are idle.

Let users know with a warning message when transitioning from a
non-oversubscribed to an oversubscribed runlist.
Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarOak Zeng <Oak.Zeng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ba9e93c5
...@@ -203,11 +203,15 @@ static int pm_create_runlist_ib(struct packet_manager *pm, ...@@ -203,11 +203,15 @@ static int pm_create_runlist_ib(struct packet_manager *pm,
pr_debug("Finished map process and queues to runlist\n"); pr_debug("Finished map process and queues to runlist\n");
if (is_over_subscription) if (is_over_subscription) {
if (!pm->is_over_subscription)
pr_warn("Runlist is getting oversubscribed. Expect reduced ROCm performance.\n");
retval = pm->pmf->runlist(pm, &rl_buffer[rl_wptr], retval = pm->pmf->runlist(pm, &rl_buffer[rl_wptr],
*rl_gpu_addr, *rl_gpu_addr,
alloc_size_bytes / sizeof(uint32_t), alloc_size_bytes / sizeof(uint32_t),
true); true);
}
pm->is_over_subscription = is_over_subscription;
for (i = 0; i < alloc_size_bytes / sizeof(uint32_t); i++) for (i = 0; i < alloc_size_bytes / sizeof(uint32_t); i++)
pr_debug("0x%2X ", rl_buffer[i]); pr_debug("0x%2X ", rl_buffer[i]);
......
...@@ -937,6 +937,7 @@ struct packet_manager { ...@@ -937,6 +937,7 @@ struct packet_manager {
bool allocated; bool allocated;
struct kfd_mem_obj *ib_buffer_obj; struct kfd_mem_obj *ib_buffer_obj;
unsigned int ib_size_bytes; unsigned int ib_size_bytes;
bool is_over_subscription;
const struct packet_manager_funcs *pmf; const struct packet_manager_funcs *pmf;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment