[PATCH 10/11] drm/amdkfd: Print event limit messages only once per process
Oded Gabbay
oded.gabbay at gmail.com
Sun Sep 17 12:04:51 UTC 2017
On Sat, Sep 16, 2017 at 2:43 AM, Felix Kuehling <Felix.Kuehling at amd.com> wrote:
> To avoid spamming the log.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_events.c | 5 ++++-
> drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 +
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
> index 5979158..944abfa 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
> @@ -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;
> }
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> index bb71697..a546d01 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> @@ -532,6 +532,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;
> };
>
> /**
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay at gmail.com>
More information about the amd-gfx
mailing list