diff mbox series

lima: avoid error task dump attempt when not enabled

Message ID 20220205185909.878643-1-nunes.erico@gmail.com (mailing list archive)
State New, archived
Headers show
Series lima: avoid error task dump attempt when not enabled | expand

Commit Message

Erico Nunes Feb. 5, 2022, 6:59 p.m. UTC
Currently when users try to run an application with lima and that hits
an issue such as a timeout, a message saying "fail to save task state"
and "error task list is full" is shown in dmesg.

The error task dump is a debug feature disabled by default, so the
error task list is usually not going to be available at all.
The message can be misleading and creates confusion in bug reports.

We can avoid that code path and that particular message when the user
has not explicitly set the max_error_tasks parameter to enable the
feature.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
---
 drivers/gpu/drm/lima/lima_sched.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Qiang Yu Feb. 7, 2022, 1:18 a.m. UTC | #1
Looks good for me, patch is:
Reviewed-by: Qiang Yu <yuq825@gmail.com>

On Sun, Feb 6, 2022 at 2:59 AM Erico Nunes <nunes.erico@gmail.com> wrote:
>
> Currently when users try to run an application with lima and that hits
> an issue such as a timeout, a message saying "fail to save task state"
> and "error task list is full" is shown in dmesg.
>
> The error task dump is a debug feature disabled by default, so the
> error task list is usually not going to be available at all.
> The message can be misleading and creates confusion in bug reports.
>
> We can avoid that code path and that particular message when the user
> has not explicitly set the max_error_tasks parameter to enable the
> feature.
>
> Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
> ---
>  drivers/gpu/drm/lima/lima_sched.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c
> index 5612d73f238f..12437e42cc76 100644
> --- a/drivers/gpu/drm/lima/lima_sched.c
> +++ b/drivers/gpu/drm/lima/lima_sched.c
> @@ -409,7 +409,8 @@ static enum drm_gpu_sched_stat lima_sched_timedout_job(struct drm_sched_job *job
>
>         drm_sched_increase_karma(&task->base);
>
> -       lima_sched_build_error_task_list(task);
> +       if (lima_max_error_tasks)
> +               lima_sched_build_error_task_list(task);
>
>         pipe->task_error(pipe);
>
> --
> 2.34.1
>
Javier Martinez Canillas Feb. 9, 2022, 9:26 a.m. UTC | #2
Hello Erico,

On 2/5/22 19:59, Erico Nunes wrote:
> Currently when users try to run an application with lima and that hits
> an issue such as a timeout, a message saying "fail to save task state"
> and "error task list is full" is shown in dmesg.
> 
> The error task dump is a debug feature disabled by default, so the
> error task list is usually not going to be available at all.
> The message can be misleading and creates confusion in bug reports.
> 
> We can avoid that code path and that particular message when the user
> has not explicitly set the max_error_tasks parameter to enable the
> feature.
> 
> Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
> ---

Looks good to me. 

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

Best regards,
diff mbox series

Patch

diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c
index 5612d73f238f..12437e42cc76 100644
--- a/drivers/gpu/drm/lima/lima_sched.c
+++ b/drivers/gpu/drm/lima/lima_sched.c
@@ -409,7 +409,8 @@  static enum drm_gpu_sched_stat lima_sched_timedout_job(struct drm_sched_job *job
 
 	drm_sched_increase_karma(&task->base);
 
-	lima_sched_build_error_task_list(task);
+	if (lima_max_error_tasks)
+		lima_sched_build_error_task_list(task);
 
 	pipe->task_error(pipe);