mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
habanalabs: Skip updating CI of internal queues if not in use
There are no internal queues if H/W queues are being used. In this case we can skip the redundant traversal over the queues array, looking for internal queues. Signed-off-by: Tomer Tayar <ttayar@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
ea6ee260cb
commit
4ba1b227b6
1 changed files with 5 additions and 0 deletions
|
@ -48,6 +48,11 @@ void hl_int_hw_queue_update_ci(struct hl_cs *cs)
|
|||
return;
|
||||
|
||||
q = &hdev->kernel_queues[0];
|
||||
|
||||
/* There are no internal queues if H/W queues are being used */
|
||||
if (!hdev->asic_prop.max_queues || q->queue_type == QUEUE_TYPE_HW)
|
||||
return;
|
||||
|
||||
for (i = 0 ; i < hdev->asic_prop.max_queues ; i++, q++) {
|
||||
if (q->queue_type == QUEUE_TYPE_INT)
|
||||
atomic_add(cs->jobs_in_queue_cnt[i], &q->ci);
|
||||
|
|
Loading…
Reference in a new issue