From: Matthew Brost <matthew.brost@intel.com>
To: Philipp Stanner <phasta@kernel.org>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
tursulin@ursulin.net, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drm/sched: Fix comment in drm_sched_run_job_work()
Date: Wed, 29 Oct 2025 09:54:47 -0700 [thread overview]
Message-ID: <aQJG1/izCBbNnX0a@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20251028134602.94125-3-phasta@kernel.org>
On Tue, Oct 28, 2025 at 02:46:01PM +0100, Philipp Stanner wrote:
> drm_sched_run_job_work() contains a comment which explains that an
> entity being NULL means that there is no more work to do. It can,
> however, also mean that there is work, but the scheduler doesn't have
> enough credits to process the jobs right now.
>
> Provide this detail in the comment.
>
> Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/scheduler/sched_main.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index c39f0245e3a9..492e8af639db 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -1237,8 +1237,13 @@ static void drm_sched_run_job_work(struct work_struct *w)
>
> /* Find entity with a ready job */
> entity = drm_sched_select_entity(sched);
> - if (!entity)
> - return; /* No more work */
> + if (!entity) {
> + /*
> + * Either no more work to do, or the next ready job needs more
> + * credits than the scheduler has currently available.
> + */
> + return;
> + }
>
> sched_job = drm_sched_entity_pop_job(entity);
> if (!sched_job) {
> --
> 2.49.0
>
next prev parent reply other threads:[~2025-10-29 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 13:46 [PATCH 0/2] drm/sched: Document potential forever-hang Philipp Stanner
2025-10-28 13:46 ` [PATCH 1/2] drm/sched: Fix comment in drm_sched_run_job_work() Philipp Stanner
2025-10-29 16:54 ` Matthew Brost [this message]
2025-10-31 10:10 ` Philipp Stanner
2025-10-28 13:46 ` [PATCH 2/2] drm/sched: Add FIXME detailing potential hang Philipp Stanner
2025-10-28 19:43 ` Matthew Brost
2025-10-29 7:30 ` Philipp Stanner
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=aQJG1/izCBbNnX0a@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=airlied@gmail.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=phasta@kernel.org \
--cc=simona@ffwll.ch \
--cc=tursulin@ursulin.net \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®