]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdkfd: Tie UNMAP_LATENCY to queue_preemption
authorAmber Lin <Amber.Lin@amd.com>
Fri, 15 Aug 2025 18:04:15 +0000 (14:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2025 11:45:10 +0000 (12:45 +0100)
commiteb6e1fb9b9134faa62091d82b5501b39acd6edbc
treececd20c7e9b5e3178b8ade6fce507578b1fc2203
parentc756f712eafce2aec91da512506d9caa222b146f
drm/amdkfd: Tie UNMAP_LATENCY to queue_preemption

[ Upstream commit f3820e9d356132e18405cd7606e22dc87ccfa6d1 ]

When KFD asks CP to preempt queues, other than preempt CP queues, CP
also requests SDMA to preempt SDMA queues with UNMAP_LATENCY timeout.
Currently queue_preemption_timeout_ms is 9000 ms by default but can be
configured via module parameter. KFD_UNMAP_LATENCY_MS is hard coded as
4000 ms though. This patch ties KFD_UNMAP_LATENCY_MS to
queue_preemption_timeout_ms so in a slow system such as emulator, both
CP and SDMA slowness are taken into account.

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdkfd/kfd_priv.h