drm/amdkfd: Print event limit messages only once per process
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 20 Sep 2017 22:10:22 +0000 (18:10 -0400)
committerOded Gabbay <oded.gabbay@gmail.com>
Wed, 20 Sep 2017 22:10:22 +0000 (18:10 -0400)
To avoid spamming the log.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/kfd_events.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h

index 5979158c3f7b93e96627af2c03cd814228b0fe01..944abfad39c1f67447ca720d5e47c4b086336a82 100644 (file)
@@ -292,7 +292,10 @@ static int create_signal_event(struct file *devkfd,
                                struct kfd_event *ev)
 {
        if (p->signal_event_count == KFD_SIGNAL_EVENT_LIMIT) {
-               pr_warn("Signal event wasn't created because limit was reached\n");
+               if (!p->signal_event_limit_reached) {
+                       pr_warn("Signal event wasn't created because limit was reached\n");
+                       p->signal_event_limit_reached = true;
+               }
                return -ENOMEM;
        }
 
index b397ec726400c2a52533356363b36bfd275dfb39..b87e96cee5facfea112a874f4e69bfad52f3b70b 100644 (file)
@@ -521,6 +521,7 @@ struct kfd_process {
        struct list_head signal_event_pages;
        u32 next_nonsignal_event_id;
        size_t signal_event_count;
+       bool signal_event_limit_reached;
 };
 
 /**