From 5b71e1afa5d61bc6d44d0d1bb087e1a73cb07c90 Mon Sep 17 00:00:00 2001 From: Felix Kuehling Date: Tue, 28 Feb 2017 15:19:53 -0500 Subject: [PATCH 1612/4131] drm/amdkfd: Print rate-limited messages for all evictions This can probably be replaced with traces later on. For now this should help us track down unexpected evictions and give user mode teams an indication when frequent evictions are responsible for performance problems. Change-Id: Ia594c9a4c8ebe095b69a853ce5550ffb03fa6b02 Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 bb7fdc3..fe99477 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c @@ -517,6 +517,7 @@ int process_evict_queues(struct device_queue_manager *dqm, { struct queue *q, *next; struct mqd_manager *mqd; + struct kfd_process_device *pdd; int retval = 0; BUG_ON(!dqm || !qpd); @@ -526,6 +527,11 @@ int process_evict_queues(struct device_queue_manager *dqm, mutex_unlock(&dqm->lock); return 0; } + + pdd = qpd_to_pdd(qpd); + pr_info_ratelimited("Evicting PASID %u queues\n", + pdd->process->pasid); + /* unactivate all active queues on the qpd */ list_for_each_entry_safe(q, next, &qpd->queues_list, list) { mqd = dqm->ops.get_mqd_manager(dqm, @@ -579,6 +585,9 @@ int process_restore_queues(struct device_queue_manager *dqm, goto out_unlock; } + pr_info_ratelimited("Restoring PASID %u queues\n", + pdd->process->pasid); + /* Update PD Base in QPD */ qpd->page_table_base = pd_base; pr_debug("Updated PD address to 0x%08x in %s\n", pd_base, __func__); -- 2.7.4