Re: [PATCH 1/2] drm/amdgpu: correct oversubscription timer inverval for gfx11
Mario Limonciello <[email protected]>
| Newsgroups | org.freedesktop.lists.amd-gfx |
|---|---|
| Message-ID | <[email protected]> |
On 8/26/26 15:27, Eric Huang wrote: > oversubscription_timer in MES is in micro second, so change the > timer's interval in KFD/useq to micro second. > > Signed-off-by: Eric Huang <[email protected]> Suggeted-by: Leo Lin <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 6 +++--- > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c > index e0e38d6bcafc..5cf1bb1c2085 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c > @@ -1171,7 +1171,7 @@ int amdgpu_mes_notify_unmap_queue(struct amdgpu_device *adev) > } > > /* Interval for notifying MES of work on unmapped queues during oversubscription */ > -#define AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_MS 50 > +#define AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_US 50 > > static unsigned int amdgpu_mes_userq_hw_queue_num(struct amdgpu_device *adev) > { > @@ -1198,7 +1198,7 @@ static void amdgpu_mes_userq_notify_unmap_work_handler(struct work_struct *work) > if (atomic_read(&mes->userq_hw_queue_count) > > amdgpu_mes_userq_hw_queue_num(adev)) > queue_delayed_work(system_wq, &mes->userq_notify_unmap_work, > - msecs_to_jiffies(AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_MS)); > + usecs_to_jiffies(AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_US)); > } > > /* > @@ -1215,7 +1215,7 @@ void amdgpu_mes_userq_queue_mapped(struct amdgpu_device *adev) > if (atomic_inc_return(&adev->mes.userq_hw_queue_count) > > amdgpu_mes_userq_hw_queue_num(adev)) > queue_delayed_work(system_wq, &adev->mes.userq_notify_unmap_work, > - msecs_to_jiffies(AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_MS)); > + usecs_to_jiffies(AMDGPU_USERQ_UNMAP_NOTIFY_DELAY_US)); > } > > /* > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > index 69cd4441e240..b37aed34a72c 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > @@ -48,7 +48,7 @@ > #define USE_DEFAULT_GRACE_PERIOD 0xffffffff > > /* Interval for notifying MES of work on unmapped queues during oversubscription */ > -#define DQM_MES_UNMAP_NOTIFY_DELAY_MS 50 > +#define DQM_MES_UNMAP_NOTIFY_DELAY_US 50 > > static int set_pasid_vmid_mapping(struct device_queue_manager *dqm, > u32 pasid, unsigned int vmid); > @@ -287,7 +287,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q, > KFD_GC_VERSION(dqm->dev) < IP_VERSION(12, 0, 0) && > dqm->active_cp_queue_count > get_cp_queues_num(dqm)) > queue_delayed_work(system_wq, &dqm->notify_unmap_work, > - msecs_to_jiffies(DQM_MES_UNMAP_NOTIFY_DELAY_MS)); > + usecs_to_jiffies(DQM_MES_UNMAP_NOTIFY_DELAY_US)); > > return r; > } > @@ -3275,7 +3275,7 @@ static void mes_notify_unmap_work_handler(struct work_struct *work) > /* Re-arm if still oversubscribed */ > if (READ_ONCE(dqm->active_cp_queue_count) > get_cp_queues_num(dqm)) > queue_delayed_work(system_wq, &dqm->notify_unmap_work, > - msecs_to_jiffies(DQM_MES_UNMAP_NOTIFY_DELAY_MS)); > + usecs_to_jiffies(DQM_MES_UNMAP_NOTIFY_DELAY_US)); > } > > struct device_queue_manager *device_queue_manager_init(struct kfd_node *dev)