drm/amdkfd: Print a warning when the runlist becomes oversubscribed
Subsystems (3)
PATCH 1/1 drm/amdkfd: Print a warning when the runlist becomes oversubscribed
Oversubscription of queues or processes results in poor performance mostly because HWS blinbly schedules busy and idle queues, resulting in poor occupancy if many queues are idle.
Let users know with a warning message when transitioning from a non-oversubscribed to an oversubscribed runlist.
--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 6 +++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +5 -1
@@ -203,11 +203,15 @@ static int pm_create_runlist_ib(struct packet_manager *pm,pr_debug ("Finished map process and queues to runlist\n" ); -if (is_over_subscription) +if (is_over_subscription) { +if (!pm->is_over_subscription) +pr_warn ("Runlist is getting oversubscribed. Expect reduced ROCm performance.\n" ); retval = pm->pmf->runlist (pm, &rl_buffer[rl_wptr], *rl_gpu_addr, alloc_size_bytes /sizeof (uint32_t ), true); + } + pm->is_over_subscription = is_over_subscription;for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i++)pr_debug ("0x%2X " , rl_buffer[i]);
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1 -0
@@ -937,6 +937,7 @@ struct packet_manager {bool allocated;struct kfd_mem_obj *ib_buffer_obj;unsigned int ib_size_bytes; +bool is_over_subscription;const struct packet_manager_funcs *pmf; };
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190620194309.11148-1-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org
Zeng, Oak
Reviewed-by Oak ZengRegards,
Oak
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Kuehling, Felix
Sent: Thursday, June 20, 2019 3:43 PM
To: [email protected]
Cc: Kuehling, Felix <[email protected]>
Subject: [PATCH 1/1] drm/amdkfd: Print a warning when the runlist becomes oversubscribed
Oversubscription of queues or processes results in poor performance mostly because HWS blinbly schedules busy and idle queues, resulting in poor occupancy if many queues are idle.
Let users know with a warning message when transitioning from a non-oversubscribed to an oversubscribed runlist.
--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 6 +++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +6 -1
@@ -203,11 +203,15 @@ static int pm_create_runlist_ib(struct packet_manager *pm,pr_debug ("Finished map process and queues to runlist\n" ); -if (is_over_subscription) +if (is_over_subscription) { +if (!pm->is_over_subscription) + pr_warn("Runlist is getting oversubscribed. Expect reduced ROCm +performance.\n"); retval = pm->pmf->runlist (pm, &rl_buffer[rl_wptr], *rl_gpu_addr, alloc_size_bytes /sizeof (uint32_t ), true); + } + pm->is_over_subscription = is_over_subscription;for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i++)
pr_debug("0x%2X ", rl_buffer[i]);
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1 -1
@@ -937,6 +937,7 @@ struct packet_manager {bool allocated;struct kfd_mem_obj *ib_buffer_obj;unsigned int ib_size_bytes; +bool is_over_subscription;const struct packet_manager_funcs *pmf; }; --
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Ping.
Shaoyun, do you mind reviewing this patch?
Thanks,
Felix
Quoted 39 lines · Felix
Oversubscription of queues or processes results in poor performance mostly because HWS blinbly schedules busy and idle queues, resulting in poor occupancy if many queues are idle.
Let users know with a warning message when transitioning from a non-oversubscribed to an oversubscribed runlist.
Signed-off-by Felix Kuehling <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 6 +++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +5
-1@@ -203,11 +203,15 @@ static int pm_create_runlist_ib(struct packet_manager *pm,pr_debug ("Finished map process and queues to runlist\n" ); -if (is_over_subscription) +if (is_over_subscription) { +if (!pm->is_over_subscription) +pr_warn ("Runlist is getting oversubscribed. Expect reduced ROCm performance.\n" ); retval = pm->pmf->runlist (pm, &rl_buffer[rl_wptr], *rl_gpu_addr, alloc_size_bytes /sizeof (uint32_t ), true); + } + pm->is_over_subscription = is_over_subscription;for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i++)pr_debug ("0x%2X " , rl_buffer[i]);drivers/gpu/drm/amd/amdkfd/kfd_priv.h +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_priv.h struct packet_manager { · line 943
Quoted 7 lines
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1
-0@@ -937,6 +937,7 @@ struct packet_manager {bool allocated;struct kfd_mem_obj *ib_buffer_obj;unsigned int ib_size_bytes; +bool is_over_subscription;const struct packet_manager_funcs *pmf; };
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 62b2f458-0b8e-f069-5ac2-2a56bcf5674d-5C7GfCeVMHo@public.gmane.org
Quoted 3 lines · Felix
Ping.
Shaoyun, do you mind reviewing this patch?
Sorry, never mind. I missed that Oak already reviewed it.
Thank you Oak!
Quoted 49 lines
Thanks,
FelixQuoted 44 lines · Felix
Oversubscription of queues or processes results in poor performance mostly because HWS blinbly schedules busy and idle queues, resulting in poor occupancy if many queues are idle.
Let users know with a warning message when transitioning from a non-oversubscribed to an oversubscribed runlist.
Signed-off-by Felix Kuehling <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 6 +++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +5
-1@@ -203,11 +203,15 @@ static int pm_create_runlist_ib(struct packet_manager *pm,pr_debug ("Finished map process and queues to runlist\n" ); -if (is_over_subscription) +if (is_over_subscription) { +if (!pm->is_over_subscription) +pr_warn ("Runlist is getting oversubscribed. Expect reduced ROCm performance.\n" ); retval = pm->pmf->runlist (pm, &rl_buffer[rl_wptr], *rl_gpu_addr, alloc_size_bytes /sizeof (uint32_t ), true); + } + pm->is_over_subscription = is_over_subscription;for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i++)pr_debug ("0x%2X " , rl_buffer[i]);drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1
-0@@ -937,6 +937,7 @@ struct packet_manager {bool allocated;struct kfd_mem_obj *ib_buffer_obj;unsigned int ib_size_bytes; +bool is_over_subscription;
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_priv.h struct packet_manager { · line 943
Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +0
-0const struct packet_manager_funcs *pmf; };_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx