From: Philipp Stanner <phasta@mailbox.org>
To: "Maíra Canal" <mcanal@igalia.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Philipp Stanner" <phasta@kernel.org>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
"Simona Vetter" <simona@ffwll.ch>,
"David Airlie" <airlied@gmail.com>,
"Melissa Wen" <mwen@igalia.com>,
"Lucas Stach" <l.stach@pengutronix.de>,
"Russell King" <linux+etnaviv@armlinux.org.uk>,
"Christian Gmeiner" <christian.gmeiner@gmail.com>,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Boris Brezillon" <boris.brezillon@collabora.com>,
"Rob Herring" <robh@kernel.org>,
"Steven Price" <steven.price@arm.com>,
"Liviu Dudau" <liviu.dudau@arm.com>
Cc: kernel-dev@igalia.com, dri-devel@lists.freedesktop.org,
etnaviv@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 5/8] drm/v3d: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset
Date: Mon, 02 Jun 2025 09:13:34 +0200 [thread overview]
Message-ID: <b25c1cabe52436c83cb570a5d65ede2fc548fc0b.camel@mailbox.org> (raw)
In-Reply-To: <20250530-sched-skip-reset-v2-5-c40a8d2d8daa@igalia.com>
On Fri, 2025-05-30 at 11:01 -0300, Maíra Canal wrote:
> When a CL/CSD job times out, we check if the GPU has made any
> progress
> since the last timeout. If so, instead of resetting the hardware, we
> skip
> the reset and allow the timer to be rearmed. This gives long-running
> jobs
> a chance to complete.
>
> Use the DRM_GPU_SCHED_STAT_NO_HANG status to skip the reset and re-
> arm
> the timer.
>
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
> ---
> drivers/gpu/drm/v3d/v3d_sched.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/v3d/v3d_sched.c
> b/drivers/gpu/drm/v3d/v3d_sched.c
> index
> e1997387831541fb053e472672004cf511c25558..fbb09a8aff3740b5cd59573b5f2
> e26b2ee352dfb 100644
> --- a/drivers/gpu/drm/v3d/v3d_sched.c
> +++ b/drivers/gpu/drm/v3d/v3d_sched.c
> @@ -761,7 +761,7 @@ v3d_cl_job_timedout(struct drm_sched_job
> *sched_job, enum v3d_queue q,
> if (*timedout_ctca != ctca || *timedout_ctra != ctra) {
> *timedout_ctca = ctca;
> *timedout_ctra = ctra;
> - return DRM_GPU_SCHED_STAT_RESET;
> + return DRM_GPU_SCHED_STAT_NO_HANG;
> }
>
> return v3d_gpu_reset_for_timeout(v3d, sched_job);
> @@ -805,7 +805,7 @@ v3d_csd_job_timedout(struct drm_sched_job
> *sched_job)
> */
> if (job->timedout_batches != batches) {
> job->timedout_batches = batches;
> - return DRM_GPU_SCHED_STAT_RESET;
> + return DRM_GPU_SCHED_STAT_NO_HANG;
> }
Wait a second, help me out here quickly. You already added workaround
stuff where you manipulate the scheduler's pending_list, as you state
in the cover letter. That code here [1].
Don't you have to remove the very same code in this series again to
still have correct behavior in your driver?
As I see it, all drm branches end up in Linus's tree ultimately. So I'd
think about potential branch-races in case you didn't already.
P.
[1] https://lore.kernel.org/dri-devel/20250430210643.57924-1-mcanal@igalia.com/T/
>
> return v3d_gpu_reset_for_timeout(v3d, sched_job);
>
next prev parent reply other threads:[~2025-06-02 7:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-30 14:01 [PATCH v2 0/8] drm/sched: Allow drivers to skip the reset with DRM_GPU_SCHED_STAT_NO_HANG Maíra Canal
2025-05-30 14:01 ` [PATCH v2 1/8] drm/sched: Rename DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RESET Maíra Canal
2025-05-30 14:01 ` [PATCH v2 2/8] drm/sched: Allow drivers to skip the reset and keep on running Maíra Canal
2025-06-02 7:06 ` Philipp Stanner
2025-05-30 14:01 ` [PATCH v2 3/8] drm/sched: Reduce scheduler's timeout for timeout tests Maíra Canal
2025-06-02 8:54 ` Philipp Stanner
2025-06-02 9:06 ` Tvrtko Ursulin
2025-05-30 14:01 ` [PATCH v2 4/8] drm/sched: Add new test for DRM_GPU_SCHED_STAT_NO_HANG Maíra Canal
2025-06-02 9:34 ` Tvrtko Ursulin
2025-05-30 14:01 ` [PATCH v2 5/8] drm/v3d: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset Maíra Canal
2025-06-02 7:13 ` Philipp Stanner [this message]
2025-06-02 11:27 ` Maíra Canal
2025-05-30 14:01 ` [PATCH v2 6/8] drm/etnaviv: " Maíra Canal
2025-06-02 7:28 ` Philipp Stanner
2025-06-02 11:36 ` Maíra Canal
2025-06-02 11:59 ` Philipp Stanner
2025-05-30 14:01 ` [PATCH v2 7/8] drm/xe: " Maíra Canal
2025-06-02 7:47 ` Philipp Stanner
2025-05-30 14:01 ` [PATCH v2 8/8] drm/panfrost: " Maíra Canal
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=b25c1cabe52436c83cb570a5d65ede2fc548fc0b.camel@mailbox.org \
--to=phasta@mailbox.org \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=christian.gmeiner@gmail.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kernel-dev@igalia.com \
--cc=l.stach@pengutronix.de \
--cc=linux+etnaviv@armlinux.org.uk \
--cc=liviu.dudau@arm.com \
--cc=lucas.demarchi@intel.com \
--cc=matthew.brost@intel.com \
--cc=mcanal@igalia.com \
--cc=mwen@igalia.com \
--cc=phasta@kernel.org \
--cc=robh@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tvrtko.ursulin@igalia.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;
as well as URLs for NNTP newsgroup(s).