Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-18 Thread Tvrtko Ursulin
On 18/07/2025 10:41, Philipp Stanner wrote: On Fri, 2025-07-18 at 10:35 +0100, Tvrtko Ursulin wrote: On 18/07/2025 10:31, Philipp Stanner wrote: On Fri, 2025-07-18 at 08:13 +0100, Tvrtko Ursulin wrote: On 16/07/2025 21:44, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 11:46, Tvrtko Ursulin w

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-18 Thread Philipp Stanner
On Fri, 2025-07-18 at 10:35 +0100, Tvrtko Ursulin wrote: > > On 18/07/2025 10:31, Philipp Stanner wrote: > > On Fri, 2025-07-18 at 08:13 +0100, Tvrtko Ursulin wrote: > > > > > > On 16/07/2025 21:44, Maíra Canal wrote: > > > > Hi Tvrtko, > > > > > > > > On 16/07/25 11:46, Tvrtko Ursulin wrote: >

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-18 Thread Tvrtko Ursulin
On 18/07/2025 10:31, Philipp Stanner wrote: On Fri, 2025-07-18 at 08:13 +0100, Tvrtko Ursulin wrote: On 16/07/2025 21:44, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 11:46, Tvrtko Ursulin wrote: On 16/07/2025 15:30, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 10:49, Tvrtko Ursulin wrote:

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-18 Thread Philipp Stanner
On Fri, 2025-07-18 at 08:13 +0100, Tvrtko Ursulin wrote: > > On 16/07/2025 21:44, Maíra Canal wrote: > > Hi Tvrtko, > > > > On 16/07/25 11:46, Tvrtko Ursulin wrote: > > > > > > On 16/07/2025 15:30, Maíra Canal wrote: > > > > Hi Tvrtko, > > > > > > > > On 16/07/25 10:49, Tvrtko Ursulin wrote: >

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-18 Thread Tvrtko Ursulin
On 16/07/2025 21:44, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 11:46, Tvrtko Ursulin wrote: On 16/07/2025 15:30, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 10:49, Tvrtko Ursulin wrote: On 16/07/2025 14:31, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:51, Tvrtko Ursulin wrote: Currently

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Maíra Canal
Hi Tvrtko, On 16/07/25 11:46, Tvrtko Ursulin wrote: On 16/07/2025 15:30, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 10:49, Tvrtko Ursulin wrote: On 16/07/2025 14:31, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:51, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Tvrtko Ursulin
On 16/07/2025 15:30, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 10:49, Tvrtko Ursulin wrote: On 16/07/2025 14:31, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:51, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs,

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Maíra Canal
Hi Tvrtko, On 16/07/25 10:49, Tvrtko Ursulin wrote: On 16/07/2025 14:31, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:51, 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

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Tvrtko Ursulin
On 16/07/2025 14:31, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:51, 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 f

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Maíra Canal
Hi Tvrtko, On 16/07/25 05:51, 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_

[PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Tvrtko Ursulin
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 c

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-11 Thread Tvrtko Ursulin
On 11/07/2025 14:04, Philipp Stanner wrote: Late to the party; had overlooked that the discussion with Matt is resolved. Some comments below On Tue, 2025-07-08 at 13:20 +0100, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-11 Thread Philipp Stanner
Late to the party; had overlooked that the discussion with Matt is resolved. Some comments below On Tue, 2025-07-08 at 13:20 +0100, 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 ag

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-11 Thread Tvrtko Ursulin
On 09/07/2025 18:22, Matthew Brost wrote: On Wed, Jul 09, 2025 at 11:49:44AM +0100, Tvrtko Ursulin wrote: On 09/07/2025 05:45, Matthew Brost wrote: On Tue, Jul 08, 2025 at 01:20:32PM +0100, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-09 Thread Matthew Brost
On Wed, Jul 09, 2025 at 11:49:44AM +0100, Tvrtko Ursulin wrote: > > On 09/07/2025 05:45, Matthew Brost wrote: > > On Tue, Jul 08, 2025 at 01:20:32PM +0100, Tvrtko Ursulin wrote: > > > Currently the job free work item will lock sched->job_list_lock first time > > > to see if there are any jobs, fre

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-09 Thread Tvrtko Ursulin
On 09/07/2025 05:45, Matthew Brost wrote: On Tue, Jul 08, 2025 at 01:20:32PM +0100, 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 ther

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-08 Thread Matthew Brost
On Tue, Jul 08, 2025 at 01:20:32PM +0100, 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_

[PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-08 Thread Tvrtko Ursulin
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 c

[PATCH] drm/sched: Avoid double re-lock on the job free path

2025-01-14 Thread Tvrtko Ursulin
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() even already looks at the second job in the queue