From: Hillf Danton <hdanton@sina.com>
To: Erico Nunes <nunes.erico@gmail.com>
Cc: Qiang Yu <yuq825@gmail.com>,
dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 4/6] drm/lima: handle spurious timeouts due to high irq latency
Date: Sun, 21 Jan 2024 17:56:04 +0800 [thread overview]
Message-ID: <20240121095604.2368-1-hdanton@sina.com> (raw)
In-Reply-To: <20240117031212.1104034-5-nunes.erico@gmail.com>
On Wed, 17 Jan 2024 04:12:10 +0100 Erico Nunes <nunes.erico@gmail.com>
>
> @@ -401,9 +399,33 @@ static enum drm_gpu_sched_stat lima_sched_timedout_job(struct drm_sched_job *job
> struct lima_sched_pipe *pipe = to_lima_pipe(job->sched);
> struct lima_sched_task *task = to_lima_task(job);
> struct lima_device *ldev = pipe->ldev;
> + struct lima_ip *ip = pipe->processor[0];
> +
> + /*
> + * If the GPU managed to complete this jobs fence, the timeout is
> + * spurious. Bail out.
> + */
> + if (dma_fence_is_signaled(task->done_fence)) {
> + DRM_WARN("%s spurious timeout\n", lima_ip_name(ip));
> + return DRM_GPU_SCHED_STAT_NOMINAL;
> + }
Given 500ms in lima_sched_pipe_init(), no timeout is spurious by define,
and stop selling bandaid like this because you have options like locating
the reasons behind timeout.
> +
> + /*
> + * Lima IRQ handler may take a long time to process an interrupt
> + * if there is another IRQ handler hogging the processing.
> + * In order to catch such cases and not report spurious Lima job
> + * timeouts, synchronize the IRQ handler and re-check the fence
> + * status.
> + */
> + synchronize_irq(ip->irq);
> +
> + if (dma_fence_is_signaled(task->done_fence)) {
> + DRM_WARN("%s unexpectedly high interrupt latency\n", lima_ip_name(ip));
> + return DRM_GPU_SCHED_STAT_NOMINAL;
> + }
>
> if (!pipe->error)
> - DRM_ERROR("lima job timeout\n");
> + DRM_ERROR("%s lima job timeout\n", lima_ip_name(ip));
>
> drm_sched_stop(&pipe->base, &task->base);
>
next prev parent reply other threads:[~2024-01-21 9:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 3:12 [PATCH v1 0/6] drm/lima: fixes and improvements to error recovery Erico Nunes
2024-01-17 3:12 ` [PATCH v1 1/6] drm/lima: fix devfreq refcount imbalance for job timeouts Erico Nunes
2024-01-17 18:13 ` Vasily Khoruzhick
2024-01-18 1:36 ` Qiang Yu
2024-01-18 11:14 ` Erico Nunes
2024-01-19 1:50 ` Qiang Yu
2024-01-23 23:19 ` Erico Nunes
2024-01-24 1:03 ` Qiang Yu
2024-01-17 3:12 ` [PATCH v1 2/6] drm/lima: reset async_reset on pp hard reset Erico Nunes
2024-01-17 18:17 ` Vasily Khoruzhick
2024-01-18 1:56 ` Qiang Yu
2024-01-17 3:12 ` [PATCH v1 3/6] drm/lima: set bus_stop bit before " Erico Nunes
2024-01-17 18:23 ` Vasily Khoruzhick
2024-01-18 2:01 ` Qiang Yu
2024-01-18 11:43 ` Erico Nunes
2024-01-17 3:12 ` [PATCH v1 4/6] drm/lima: handle spurious timeouts due to high irq latency Erico Nunes
2024-01-17 18:26 ` Vasily Khoruzhick
2024-01-18 2:46 ` Qiang Yu
2024-01-18 11:38 ` Erico Nunes
2024-01-19 1:43 ` Qiang Yu
2024-01-21 3:04 ` Qiang Yu
2024-01-21 9:56 ` Hillf Danton [this message]
2024-01-21 11:20 ` Qiang Yu
2024-01-21 15:11 ` Erico Nunes
2024-01-23 1:18 ` Qiang Yu
2024-01-17 3:12 ` [PATCH v1 5/6] drm/lima: remove guilty drm_sched context handling Erico Nunes
2024-01-17 18:28 ` Vasily Khoruzhick
2024-01-17 3:12 ` [PATCH v1 6/6] drm/lima: improve some pp debug messages Erico Nunes
2024-01-17 18:29 ` Vasily Khoruzhick
2024-01-17 7:22 ` [PATCH v1 0/6] drm/lima: fixes and improvements to error recovery Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240121095604.2368-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=lima@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nunes.erico@gmail.com \
--cc=yuq825@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox