From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 10/16] drm/amdgpu/gfx9: rework kernel queue priority handling
Date: Wed, 18 Mar 2026 10:08:31 -0400 [thread overview]
Message-ID: <20260318140837.582776-10-alexander.deucher@amd.com> (raw)
In-Reply-To: <20260318140837.582776-1-alexander.deucher@amd.com>
Rather than setting a higher queue priority which could
starve a lower priority queue, enable longer quantums
for high priority kernel queues. This will avoid
starvation, but provide longer runtime for high priority
queues.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 2eb32f92a77c4..aaf75c82b1bf5 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3670,7 +3670,10 @@ static int gfx_v9_0_mqd_init(struct amdgpu_ring *ring)
tmp = RREG32_SOC15(GC, 0, mmCP_HQD_QUANTUM);
tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_EN, 1);
tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_SCALE, 1);
- tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_DURATION, 1);
+ if (amdgpu_gfx_is_high_priority_compute_queue(adev, ring))
+ tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_DURATION, 2);
+ else
+ tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_DURATION, 1);
mqd->cp_hqd_quantum = tmp;
/* map_queues packet doesn't need activate the queue,
--
2.53.0
next prev parent reply other threads:[~2026-03-18 14:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 14:08 [PATCH 01/16] drm/amdgpu/gfx7: align mqd settings with KFD Alex Deucher
2026-03-18 14:08 ` [PATCH 02/16] drm/amdgpu/gfx8: " Alex Deucher
2026-03-18 14:08 ` [PATCH 03/16] drm/amdgpu/gfx9: " Alex Deucher
2026-03-18 14:08 ` [PATCH 04/16] drm/amdgpu/gfx9.4.3: " Alex Deucher
2026-04-03 14:03 ` Alex Deucher
2026-04-17 17:54 ` Alex Deucher
2026-04-17 18:51 ` Russell, Kent
2026-03-18 14:08 ` [PATCH 05/16] drm/amdgpu/gfx10: " Alex Deucher
2026-03-18 14:08 ` [PATCH 06/16] drm/amdgpu/gfx11: " Alex Deucher
2026-03-18 14:08 ` [PATCH 07/16] drm/amdgpu/gfx12: " Alex Deucher
2026-03-18 14:08 ` [PATCH 08/16] drm/amdgpu/gfx12.1: " Alex Deucher
2026-04-03 14:03 ` Alex Deucher
2026-04-17 17:54 ` Alex Deucher
2026-04-17 18:51 ` Russell, Kent
2026-04-17 21:59 ` Joshi, Mukul
2026-03-18 14:08 ` [PATCH 09/16] drm/amdgpu/gfx8: rework kernel queue priority handling Alex Deucher
2026-03-18 14:08 ` Alex Deucher [this message]
2026-03-18 14:08 ` [PATCH 11/16] drm/amdgpu/gfx9.4.3: " Alex Deucher
2026-03-18 14:08 ` [PATCH 12/16] drm/amdgpu/gfx10: " Alex Deucher
2026-03-18 14:08 ` [PATCH 13/16] drm/amdgpu/gfx11: " Alex Deucher
2026-03-18 14:08 ` [PATCH 14/16] drm/amdgpu/gfx12: " Alex Deucher
2026-03-18 14:08 ` [PATCH 15/16] drm/amdgpu/gfx12.1: " Alex Deucher
2026-03-18 14:08 ` [PATCH 16/16] drm/amdgpu: don't set queue priorities for kernel queues Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260318140837.582776-10-alexander.deucher@amd.com \
--to=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox