Re: drm(4), multi-threaded task queues and barriers

2019-07-05 Thread Jonathan Gray
On Fri, Jul 05, 2019 at 12:20:20PM +0200, Mark Kettenis wrote: > > Date: Fri, 5 Jul 2019 14:20:40 +1000 > > From: Jonathan Gray > > > > On Wed, Jun 12, 2019 at 09:15:36AM +0200, Mark Kettenis wrote: > > > > Date: Wed, 12 Jun 2019 17:04:10 +1000 > > > > From: Jonathan Gray > > > > > > > > On

Re: drm(4), multi-threaded task queues and barriers

2019-07-05 Thread Mark Kettenis
> Date: Fri, 5 Jul 2019 14:20:40 +1000 > From: Jonathan Gray > > On Wed, Jun 12, 2019 at 09:15:36AM +0200, Mark Kettenis wrote: > > > Date: Wed, 12 Jun 2019 17:04:10 +1000 > > > From: Jonathan Gray > > > > > > On Tue, Jun 11, 2019 at 09:10:46PM +0200, Mark Kettenis wrote: > > > > The drm(4)

Re: drm(4), multi-threaded task queues and barriers

2019-07-04 Thread Jonathan Gray
On Wed, Jun 12, 2019 at 09:15:36AM +0200, Mark Kettenis wrote: > > Date: Wed, 12 Jun 2019 17:04:10 +1000 > > From: Jonathan Gray > > > > On Tue, Jun 11, 2019 at 09:10:46PM +0200, Mark Kettenis wrote: > > > The drm(4) codebase really needs multi-threaded task queues since the > > > code has taks

Re: drm(4), multi-threaded task queues and barriers

2019-06-16 Thread Sven M. Hallberg
Mark Kettenis on Thu, Jun 13 2019: > So here is a diff that fixes the problem as far as I can tell. > Jonathan, Sven, can you give this a go? Works for me. > + tq->tq_waiting++; > msleep(tq, >tq_mtx, PWAIT, "bored", 0); > + tq->tq_waiting--; Heh, didn't

Re: drm(4), multi-threaded task queues and barriers

2019-06-13 Thread Jonathan Gray
On Thu, Jun 13, 2019 at 11:27:57PM +0200, Mark Kettenis wrote: > > Date: Wed, 12 Jun 2019 23:57:27 +0200 (CEST) > > From: Mark Kettenis > > > > > From: "Sven M. Hallberg" > > > Date: Wed, 12 Jun 2019 23:18:24 +0200 > > > > > > Mark Kettenis on Tue, Jun 11 2019: > > > > The drm(4) codebase

Re: drm(4), multi-threaded task queues and barriers

2019-06-13 Thread Mark Kettenis
> Date: Wed, 12 Jun 2019 23:57:27 +0200 (CEST) > From: Mark Kettenis > > > From: "Sven M. Hallberg" > > Date: Wed, 12 Jun 2019 23:18:24 +0200 > > > > Mark Kettenis on Tue, Jun 11 2019: > > > The drm(4) codebase really needs multi-threaded task queues [...] > > > > > > The diff also starts 4

Re: drm(4), multi-threaded task queues and barriers

2019-06-13 Thread Sven M. Hallberg
Mark Kettenis on Wed, Jun 12 2019: >> Looks good and appears to work fine with two displays (one internal, one >> external). Will test with three at work tomorrow. Your diff also works for me with three displays (inteldrm). > Unfortunately the diff doesn't work with amdgpu. Some more thinking >

Re: drm(4), multi-threaded task queues and barriers

2019-06-12 Thread Mark Kettenis
> From: "Sven M. Hallberg" > Date: Wed, 12 Jun 2019 23:18:24 +0200 > > Mark Kettenis on Tue, Jun 11 2019: > > The drm(4) codebase really needs multi-threaded task queues [...] > > > > The diff also starts 4 threads for each workqueue that gets created by > > the drm(4) layer. The number 4 is a

Re: drm(4), multi-threaded task queues and barriers

2019-06-12 Thread Sven M. Hallberg
Mark Kettenis on Tue, Jun 11 2019: > The drm(4) codebase really needs multi-threaded task queues [...] > > The diff also starts 4 threads for each workqueue that gets created by > the drm(4) layer. The number 4 is a bit arbitrary but it is the > number of threads that Linux creates per CPU for a

Re: drm(4), multi-threaded task queues and barriers

2019-06-12 Thread Mark Kettenis
> Date: Wed, 12 Jun 2019 17:04:10 +1000 > From: Jonathan Gray > > On Tue, Jun 11, 2019 at 09:10:46PM +0200, Mark Kettenis wrote: > > The drm(4) codebase really needs multi-threaded task queues since the > > code has taks that wait for the completion of other tasks that are > > submitted to the

Re: drm(4), multi-threaded task queues and barriers

2019-06-12 Thread Jonathan Gray
On Tue, Jun 11, 2019 at 09:10:46PM +0200, Mark Kettenis wrote: > The drm(4) codebase really needs multi-threaded task queues since the > code has taks that wait for the completion of other tasks that are > submitted to the same task queue. Thank you Linux... > > Unfortunately the code also needs

drm(4), multi-threaded task queues and barriers

2019-06-11 Thread Mark Kettenis
The drm(4) codebase really needs multi-threaded task queues since the code has taks that wait for the completion of other tasks that are submitted to the same task queue. Thank you Linux... Unfortunately the code also needs to wait for the completion of submitted tasks from other threads. This