Commit 36582fa5 authored by Felix Kuehling's avatar Felix Kuehling Committed by Oded Gabbay

drm/amdkfd: Fix oversubscription accounting

Don't count SDMA queues towards compute HQD oversubscription when
deciding whether to create a chained runlist.
Signed-off-by: default avatarJay Cornwall <Jay.Cornwall@amd.com>
Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Acked-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
parent a99c6d4f
...@@ -55,13 +55,14 @@ static void pm_calc_rlib_size(struct packet_manager *pm, ...@@ -55,13 +55,14 @@ static void pm_calc_rlib_size(struct packet_manager *pm,
unsigned int *rlib_size, unsigned int *rlib_size,
bool *over_subscription) bool *over_subscription)
{ {
unsigned int process_count, queue_count; unsigned int process_count, queue_count, compute_queue_count;
unsigned int map_queue_size; unsigned int map_queue_size;
unsigned int max_proc_per_quantum = 1; unsigned int max_proc_per_quantum = 1;
struct kfd_dev *dev = pm->dqm->dev; struct kfd_dev *dev = pm->dqm->dev;
process_count = pm->dqm->processes_count; process_count = pm->dqm->processes_count;
queue_count = pm->dqm->queue_count; queue_count = pm->dqm->queue_count;
compute_queue_count = queue_count - pm->dqm->sdma_queue_count;
/* check if there is over subscription /* check if there is over subscription
* Note: the arbitration between the number of VMIDs and * Note: the arbitration between the number of VMIDs and
...@@ -74,7 +75,7 @@ static void pm_calc_rlib_size(struct packet_manager *pm, ...@@ -74,7 +75,7 @@ static void pm_calc_rlib_size(struct packet_manager *pm,
max_proc_per_quantum = dev->max_proc_per_quantum; max_proc_per_quantum = dev->max_proc_per_quantum;
if ((process_count > max_proc_per_quantum) || if ((process_count > max_proc_per_quantum) ||
queue_count > get_queues_num(pm->dqm)) { compute_queue_count > get_queues_num(pm->dqm)) {
*over_subscription = true; *over_subscription = true;
pr_debug("Over subscribed runlist\n"); pr_debug("Over subscribed runlist\n");
} }
......
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