Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@kernel.org>
To: "Maíra Canal" <mcanal@igalia.com>
Cc: "Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
	dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org, kernel-dev@igalia.com,
	"Christian König" <christian.koenig@amd.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Philipp Stanner" <phasta@kernel.org>
Subject: Re: [PATCH v2] drm/sched: Avoid double re-lock on the job free path
Date: Fri, 11 Jul 2025 21:22:20 +0200	[thread overview]
Message-ID: <7df6a7ea-658a-435a-9b4e-49a3d1b4677f@kernel.org> (raw)
In-Reply-To: <d59b7550-5833-4377-9d94-33161f375604@igalia.com>

On 7/11/25 9:08 PM, Maíra Canal wrote:
> Hi Tvrtko,
> 
> On 11/07/25 12:09, Tvrtko Ursulin wrote:
>> Currently the job free work item will lock sched->job_list_lock first time
>> to see if there are any jobs, free a single job, and then lock again to
>> decide whether to re-queue itself if there are more finished jobs.
>>
>> Since drm_sched_get_finished_job() already looks at the second job in the
>> queue we can simply add the signaled check and have it return the presence
>> of more jobs to be freed to the caller. That way the work item does not
>> have to lock the list again and repeat the signaled check.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>> Cc: Christian König <christian.koenig@amd.com>
>> Cc: Danilo Krummrich <dakr@kernel.org>
>> Cc: Matthew Brost <matthew.brost@intel.com>
>> Cc: Philipp Stanner <phasta@kernel.org>
>> ---
>> v2:
>>   * Improve commit text and kerneldoc. (Philipp)
>>   * Rename run free work helper. (Philipp)
> 
> Maybe, would it be possible not to rename it? Otherwise, I won't be able
> to use the function name `drm_sched_run_free_queue()` in the
> DRM_GPU_SCHED_STAT_NO_HANG series.
> 
> Not a big deal, but it would ease reintroducing
> `drm_sched_run_free_queue()` if the series lands after this patch.

Do you intend to land your series through a different tree?

  reply	other threads:[~2025-07-11 19:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11 15:09 [PATCH v2] drm/sched: Avoid double re-lock on the job free path Tvrtko Ursulin
2025-07-11 15:15 ` ✓ CI.KUnit: success for drm/sched: Avoid double re-lock on the job free path (rev3) Patchwork
2025-07-11 15:54 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-11 19:08 ` [PATCH v2] drm/sched: Avoid double re-lock on the job free path Maíra Canal
2025-07-11 19:22   ` Danilo Krummrich [this message]
2025-07-12 13:12     ` Maíra Canal
2025-07-14  7:53       ` Tvrtko Ursulin
2025-07-12  0:05 ` ✗ Xe.CI.Full: failure for drm/sched: Avoid double re-lock on the job free path (rev3) Patchwork

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=7df6a7ea-658a-435a-9b4e-49a3d1b4677f@kernel.org \
    --to=dakr@kernel.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kernel-dev@igalia.com \
    --cc=matthew.brost@intel.com \
    --cc=mcanal@igalia.com \
    --cc=phasta@kernel.org \
    --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