From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: <intel-xe@lists.freedesktop.org>, <matthew.brost@intel.com>
Subject: [PATCH 01/13] drm/sched: Rename drm_sched_get_cleanup_job to be more descriptive
Date: Mon, 11 Dec 2023 19:10:33 -0500 [thread overview]
Message-ID: <20231212001045.1099517-1-rodrigo.vivi@intel.com> (raw)
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
"Get cleanup job" makes it sound like helper is returning a job which will
execute some cleanup, or something, while the kerneldoc itself accurately
says "fetch the next _finished_ job". So lets rename the helper to be self
documenting.
(cherry picked from commit 7abbbe2694b3d4fd366dc91934f42c047a6d282d)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Luben Tuikov <ltuikov89@gmail.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231102105538.391648-2-tvrtko.ursulin@linux.intel.com
Reviewed-by: Luben Tuikov <ltuikov89@gmail.com>
Signed-off-by: Luben Tuikov <ltuikov89@gmail.com>
Fixes: f7fe64ad0f22ff ("drm/sched: Split free_job into own work item")
Fixes: bc8d6a9df99038 ("drm/sched: Don't disturb the entity when in RR-mode scheduling")
Fixes: 56e449603f0ac5 ("drm/sched: Convert the GPU scheduler to variable number of run-queues")
Link: https://lists.freedesktop.org/archives/dri-devel/2023-November/431606.html
Fixes: f3123c2590005c ("drm/sched: Qualify drm_sched_wakeup() by drm_sched_entity_is_ready()")
---
drivers/gpu/drm/scheduler/sched_main.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 98b2ad54fc70..fb64b35451f5 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -448,7 +448,7 @@ static void drm_sched_job_timedout(struct work_struct *work)
sched = container_of(work, struct drm_gpu_scheduler, work_tdr.work);
- /* Protects against concurrent deletion in drm_sched_get_cleanup_job */
+ /* Protects against concurrent deletion in drm_sched_get_finished_job */
spin_lock(&sched->job_list_lock);
job = list_first_entry_or_null(&sched->pending_list,
struct drm_sched_job, list);
@@ -500,9 +500,9 @@ void drm_sched_stop(struct drm_gpu_scheduler *sched, struct drm_sched_job *bad)
/*
* Reinsert back the bad job here - now it's safe as
- * drm_sched_get_cleanup_job cannot race against us and release the
+ * drm_sched_get_finished_job cannot race against us and release the
* bad job at this point - we parked (waited for) any in progress
- * (earlier) cleanups and drm_sched_get_cleanup_job will not be called
+ * (earlier) cleanups and drm_sched_get_finished_job will not be called
* now until the scheduler thread is unparked.
*/
if (bad && bad->sched == sched)
@@ -960,7 +960,7 @@ drm_sched_select_entity(struct drm_gpu_scheduler *sched)
}
/**
- * drm_sched_get_cleanup_job - fetch the next finished job to be destroyed
+ * drm_sched_get_finished_job - fetch the next finished job to be destroyed
*
* @sched: scheduler instance
*
@@ -968,7 +968,7 @@ drm_sched_select_entity(struct drm_gpu_scheduler *sched)
* ready for it to be destroyed.
*/
static struct drm_sched_job *
-drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
+drm_sched_get_finished_job(struct drm_gpu_scheduler *sched)
{
struct drm_sched_job *job, *next;
@@ -1059,14 +1059,14 @@ static void drm_sched_free_job_work(struct work_struct *w)
{
struct drm_gpu_scheduler *sched =
container_of(w, struct drm_gpu_scheduler, work_free_job);
- struct drm_sched_job *cleanup_job;
+ struct drm_sched_job *job;
if (READ_ONCE(sched->pause_submit))
return;
- cleanup_job = drm_sched_get_cleanup_job(sched);
- if (cleanup_job) {
- sched->ops->free_job(cleanup_job);
+ job = drm_sched_get_finished_job(sched);
+ if (job) {
+ sched->ops->free_job(job);
drm_sched_free_job_queue_if_done(sched);
drm_sched_run_job_queue_if_ready(sched);
--
2.43.0
next reply other threads:[~2023-12-12 0:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 0:10 Rodrigo Vivi [this message]
2023-12-12 0:10 ` [PATCH 02/13] drm/sched: Move free worker re-queuing out of the if block Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 03/13] drm/sched: Rename drm_sched_free_job_queue to be more descriptive Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 04/13] drm/sched: Rename drm_sched_run_job_queue_if_ready and clarify kerneldoc Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 05/13] drm/sched: Drop suffix from drm_sched_wakeup_if_can_queue Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 06/13] drm/sched: Don't disturb the entity when in RR-mode scheduling Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 07/13] drm/sched: Qualify drm_sched_wakeup() by drm_sched_entity_is_ready() Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 08/13] drm/sched: implement dynamic job-flow control Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 09/13] drm/sched: Fix bounds limiting when given a malformed entity Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 10/13] drm/sched: Rename priority MIN to LOW Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 11/13] drm/sched: Reverse run-queue priority enumeration Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 12/13] drm/sched: Partial revert of "Qualify drm_sched_wakeup() by drm_sched_entity_is_ready()" Rodrigo Vivi
2023-12-12 0:10 ` [PATCH 13/13] fixup! drm/xe: Introduce a new DRM driver for Intel GPUs Rodrigo Vivi
2023-12-12 0:55 ` Matthew Brost
2023-12-12 1:21 ` ✓ CI.Patch_applied: success for series starting with [01/13] drm/sched: Rename drm_sched_get_cleanup_job to be more descriptive Patchwork
2023-12-12 1:22 ` ✗ CI.checkpatch: warning " Patchwork
2023-12-12 1:23 ` ✓ CI.KUnit: success " Patchwork
2023-12-12 1:30 ` ✓ CI.Build: " Patchwork
2023-12-12 1:31 ` ✓ CI.Hooks: " Patchwork
2023-12-12 1:32 ` ✓ CI.checksparse: " Patchwork
2023-12-12 2:06 ` ✓ CI.BAT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-12-11 19:12 [PATCH 01/13] " Rodrigo Vivi
2023-12-08 20:27 Rodrigo Vivi
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=20231212001045.1099517-1-rodrigo.vivi@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.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