Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-09-12 Thread Danilo Krummrich
On Tue, Sep 12, 2023 at 03:52:28PM +0200, Boris Brezillon wrote: > On Tue, 12 Sep 2023 14:56:06 +0200 > Danilo Krummrich wrote: > > > On Tue, Sep 12, 2023 at 02:18:18PM +0200, Boris Brezillon wrote: > > > On Tue, 12 Sep 2023 12:46:26 +0200 > > > Danilo Krummrich wrote: > > > > > > > > I'm a

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-09-12 Thread Boris Brezillon
On Tue, 12 Sep 2023 15:34:41 +0200 Danilo Krummrich wrote: > On Tue, Sep 12, 2023 at 03:27:05PM +0200, Boris Brezillon wrote: > > On Fri, 25 Aug 2023 15:45:49 +0200 > > Christian König wrote: > > > > > I tried this patch with Nouveau and found a race condition: > > > > > > In

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-09-12 Thread Boris Brezillon
On Tue, 12 Sep 2023 14:56:06 +0200 Danilo Krummrich wrote: > On Tue, Sep 12, 2023 at 02:18:18PM +0200, Boris Brezillon wrote: > > On Tue, 12 Sep 2023 12:46:26 +0200 > > Danilo Krummrich wrote: > > > > > > I'm a bit worried that leaving this single vs multi-threaded wq > > > > decision to

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-09-12 Thread Danilo Krummrich
On Tue, Sep 12, 2023 at 03:27:05PM +0200, Boris Brezillon wrote: > On Fri, 25 Aug 2023 15:45:49 +0200 > Christian König wrote: > > > I tried this patch with Nouveau and found a race condition: > > > > In drm_sched_run_job_work() the job is added to the pending_list via > >

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-09-12 Thread Boris Brezillon
On Fri, 25 Aug 2023 15:45:49 +0200 Christian König wrote: > I tried this patch with Nouveau and found a race condition: > > In drm_sched_run_job_work() the job is added to the pending_list via > drm_sched_job_begin(), then the run_job() callback is called and the >

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-09-12 Thread Danilo Krummrich
On Tue, Sep 12, 2023 at 02:18:18PM +0200, Boris Brezillon wrote: > On Tue, 12 Sep 2023 12:46:26 +0200 > Danilo Krummrich wrote: > > > > I'm a bit worried that leaving this single vs multi-threaded wq > > > decision to drivers is going to cause unnecessary pain, because what > > > was previously

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-09-12 Thread Boris Brezillon
On Tue, 12 Sep 2023 12:46:26 +0200 Danilo Krummrich wrote: > > I'm a bit worried that leaving this single vs multi-threaded wq > > decision to drivers is going to cause unnecessary pain, because what > > was previously a granted in term of run/cleanup execution order (thanks > > to the

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-09-12 Thread Danilo Krummrich
On Tue, Sep 12, 2023 at 12:13:57PM +0200, Boris Brezillon wrote: > On Fri, 25 Aug 2023 15:45:49 +0200 > Christian König wrote: > > > Am 25.08.23 um 15:36 schrieb Matthew Brost: > > > On Fri, Aug 25, 2023 at 10:02:32AM +0200, Christian König wrote: > > >> Am 25.08.23 um 04:58 schrieb Matthew

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-09-12 Thread Boris Brezillon
On Fri, 25 Aug 2023 15:45:49 +0200 Christian König wrote: > Am 25.08.23 um 15:36 schrieb Matthew Brost: > > On Fri, Aug 25, 2023 at 10:02:32AM +0200, Christian König wrote: > >> Am 25.08.23 um 04:58 schrieb Matthew Brost: > >>> On Fri, Aug 25, 2023 at 01:04:10AM +0200, Danilo Krummrich

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-28 Thread Danilo Krummrich
On 8/28/23 20:41, Matthew Brost wrote: On Mon, Aug 28, 2023 at 08:04:31PM +0200, Danilo Krummrich wrote: On 8/11/23 04:31, Matthew Brost wrote: Rather than call free_job and run_job in same work item have a dedicated work item for each. This aligns with the design and intended use of work

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-28 Thread Matthew Brost
On Mon, Aug 28, 2023 at 08:04:31PM +0200, Danilo Krummrich wrote: > On 8/11/23 04:31, Matthew Brost wrote: > > Rather than call free_job and run_job in same work item have a dedicated > > work item for each. This aligns with the design and intended use of work > > queues. > > > > Signed-off-by:

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-28 Thread Danilo Krummrich
On 8/11/23 04:31, Matthew Brost wrote: Rather than call free_job and run_job in same work item have a dedicated work item for each. This aligns with the design and intended use of work queues. Signed-off-by: Matthew Brost --- drivers/gpu/drm/scheduler/sched_main.c | 137

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-25 Thread Christian König
Am 25.08.23 um 15:36 schrieb Matthew Brost: On Fri, Aug 25, 2023 at 10:02:32AM +0200, Christian König wrote: Am 25.08.23 um 04:58 schrieb Matthew Brost: On Fri, Aug 25, 2023 at 01:04:10AM +0200, Danilo Krummrich wrote: On Thu, Aug 10, 2023 at 07:31:32PM -0700, Matthew Brost wrote: Rather

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-25 Thread Matthew Brost
On Fri, Aug 25, 2023 at 10:02:32AM +0200, Christian König wrote: > Am 25.08.23 um 04:58 schrieb Matthew Brost: > > On Fri, Aug 25, 2023 at 01:04:10AM +0200, Danilo Krummrich wrote: > > > On Thu, Aug 10, 2023 at 07:31:32PM -0700, Matthew Brost wrote: > > > > Rather than call free_job and run_job in

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-25 Thread Christian König
Am 25.08.23 um 04:58 schrieb Matthew Brost: On Fri, Aug 25, 2023 at 01:04:10AM +0200, Danilo Krummrich wrote: On Thu, Aug 10, 2023 at 07:31:32PM -0700, Matthew Brost wrote: Rather than call free_job and run_job in same work item have a dedicated work item for each. This aligns with the design

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-24 Thread Matthew Brost
On Fri, Aug 25, 2023 at 01:04:10AM +0200, Danilo Krummrich wrote: > On Thu, Aug 10, 2023 at 07:31:32PM -0700, Matthew Brost wrote: > > Rather than call free_job and run_job in same work item have a dedicated > > work item for each. This aligns with the design and intended use of work > > queues. >

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-24 Thread Danilo Krummrich
On Thu, Aug 10, 2023 at 07:31:32PM -0700, Matthew Brost wrote: > Rather than call free_job and run_job in same work item have a dedicated > work item for each. This aligns with the design and intended use of work > queues. > > Signed-off-by: Matthew Brost > --- >

Re: [Intel-xe] [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-24 Thread Matthew Brost
On Thu, Aug 24, 2023 at 01:44:41PM +0200, Christian König wrote: > Am 24.08.23 um 01:12 schrieb Matthew Brost: > > On Wed, Aug 23, 2023 at 01:26:09PM -0400, Rodrigo Vivi wrote: > > > On Wed, Aug 23, 2023 at 11:41:19AM -0400, Alex Deucher wrote: > > > > On Wed, Aug 23, 2023 at 11:26 AM Matthew

Re: [Intel-xe] [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-24 Thread Christian König
Am 24.08.23 um 01:12 schrieb Matthew Brost: On Wed, Aug 23, 2023 at 01:26:09PM -0400, Rodrigo Vivi wrote: On Wed, Aug 23, 2023 at 11:41:19AM -0400, Alex Deucher wrote: On Wed, Aug 23, 2023 at 11:26 AM Matthew Brost wrote: On Wed, Aug 23, 2023 at 09:10:51AM +0200, Christian König wrote: Am

Re: [Intel-xe] [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-23 Thread Matthew Brost
On Wed, Aug 23, 2023 at 01:26:09PM -0400, Rodrigo Vivi wrote: > On Wed, Aug 23, 2023 at 11:41:19AM -0400, Alex Deucher wrote: > > On Wed, Aug 23, 2023 at 11:26 AM Matthew Brost > > wrote: > > > > > > On Wed, Aug 23, 2023 at 09:10:51AM +0200, Christian König wrote: > > > > Am 23.08.23 um 05:27

Re: [Intel-xe] [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-23 Thread Rodrigo Vivi
On Wed, Aug 23, 2023 at 11:41:19AM -0400, Alex Deucher wrote: > On Wed, Aug 23, 2023 at 11:26 AM Matthew Brost > wrote: > > > > On Wed, Aug 23, 2023 at 09:10:51AM +0200, Christian König wrote: > > > Am 23.08.23 um 05:27 schrieb Matthew Brost: > > > > [SNIP] > > > > > That is exactly what I want

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-23 Thread Alex Deucher
On Wed, Aug 23, 2023 at 11:26 AM Matthew Brost wrote: > > On Wed, Aug 23, 2023 at 09:10:51AM +0200, Christian König wrote: > > Am 23.08.23 um 05:27 schrieb Matthew Brost: > > > [SNIP] > > > > That is exactly what I want to avoid, tying the TDR to the job is what > > > > some > > > > AMD

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-23 Thread Matthew Brost
On Wed, Aug 23, 2023 at 09:10:51AM +0200, Christian König wrote: > Am 23.08.23 um 05:27 schrieb Matthew Brost: > > [SNIP] > > > That is exactly what I want to avoid, tying the TDR to the job is what > > > some > > > AMD engineers pushed for because it looked like a simple solution and made > > >

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-23 Thread Christian König
Am 23.08.23 um 05:27 schrieb Matthew Brost: [SNIP] That is exactly what I want to avoid, tying the TDR to the job is what some AMD engineers pushed for because it looked like a simple solution and made the whole thing similar to what Windows does. This turned the previous relatively clean

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-22 Thread Matthew Brost
On Mon, Aug 21, 2023 at 03:17:29PM +0200, Christian König wrote: > Am 18.08.23 um 15:13 schrieb Matthew Brost: > > On Fri, Aug 18, 2023 at 07:27:33AM +0200, Christian König wrote: > > > Am 17.08.23 um 19:54 schrieb Matthew Brost: > > > > On Thu, Aug 17, 2023 at 03:39:40PM +0200, Christian König

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-21 Thread Christian König
Am 18.08.23 um 15:13 schrieb Matthew Brost: On Fri, Aug 18, 2023 at 07:27:33AM +0200, Christian König wrote: Am 17.08.23 um 19:54 schrieb Matthew Brost: On Thu, Aug 17, 2023 at 03:39:40PM +0200, Christian König wrote: Am 11.08.23 um 04:31 schrieb Matthew Brost: Rather than call free_job and

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-18 Thread Matthew Brost
On Fri, Aug 18, 2023 at 07:27:33AM +0200, Christian König wrote: > Am 17.08.23 um 19:54 schrieb Matthew Brost: > > On Thu, Aug 17, 2023 at 03:39:40PM +0200, Christian König wrote: > > > Am 11.08.23 um 04:31 schrieb Matthew Brost: > > > > Rather than call free_job and run_job in same work item have

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-18 Thread Christian König
Am 17.08.23 um 19:54 schrieb Matthew Brost: On Thu, Aug 17, 2023 at 03:39:40PM +0200, Christian König wrote: Am 11.08.23 um 04:31 schrieb Matthew Brost: Rather than call free_job and run_job in same work item have a dedicated work item for each. This aligns with the design and intended use of

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-17 Thread Matthew Brost
On Thu, Aug 17, 2023 at 03:39:40PM +0200, Christian König wrote: > Am 11.08.23 um 04:31 schrieb Matthew Brost: > > Rather than call free_job and run_job in same work item have a dedicated > > work item for each. This aligns with the design and intended use of work > > queues. > > I would rather

Re: [PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-17 Thread Christian König
Am 11.08.23 um 04:31 schrieb Matthew Brost: Rather than call free_job and run_job in same work item have a dedicated work item for each. This aligns with the design and intended use of work queues. I would rather say we should get completely rid of the free_job callback. Essentially the job

[PATCH v2 4/9] drm/sched: Split free_job into own work item

2023-08-10 Thread Matthew Brost
Rather than call free_job and run_job in same work item have a dedicated work item for each. This aligns with the design and intended use of work queues. Signed-off-by: Matthew Brost --- drivers/gpu/drm/scheduler/sched_main.c | 137 ++--- include/drm/gpu_scheduler.h