[PATCH] drm/scheduler: fix function name prefix in comments

2018-05-16 Thread Nayan Deshmukh
Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> --- drivers/gpu/drm/scheduler/sched_fence.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_fence.c b/drivers/gpu/drm/scheduler/sched_fence.c index 69aab086b913..786b47

[PATCH] drm/scheduler: fix function name prefix in comments

2018-05-16 Thread Nayan Deshmukh
That got missed while moving the files outside of amdgpu. Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- drivers/gpu/drm/scheduler/sched_fence.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 2/3] drm/scheduler: add documentation

2018-05-24 Thread Nayan Deshmukh
convert existing raw comments into kernel-doc format as well as add new documentation Signed-off-by: Alex Deucher <alexander.deuc...@amd.com> Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 214 --

[PATCH 1/3] drm/scheduler: fix a corner case in dependency optimization

2018-05-24 Thread Nayan Deshmukh
When checking for a dependency fence for belonging to the same entity compare it with scheduled as well finished fence. Earlier we were only comparing it with the scheduled fence. Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> --- drivers/gpu/drm/scheduler/gpu_scheduler

[PATCH 3/3] drm/doc: add a chapter for gpu scheduler

2018-05-24 Thread Nayan Deshmukh
Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> --- Documentation/gpu/drm-mm.rst | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/gpu/drm-mm.rst b/Documentation/gpu/drm-mm.rst index b08e9dcd9177..96ebcc2a7b41 100644 --- a/Documentation/gpu/drm-

[PATCH v2] drm/scheduler: add documentation

2018-05-28 Thread Nayan Deshmukh
convert existing raw comments into kernel-doc format as well as add new documentation v2: reword the overview Signed-off-by: Alex Deucher Signed-off-by: Nayan Deshmukh Reviewed-by: Alex Deucher --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 214 -- include/drm

Re: [PATCH 2/3] drm/scheduler: add documentation

2018-05-28 Thread Nayan Deshmukh
I have done that already, sent a patch with this one. The last patch of this series. I have tried to take care of all the hyperlinks. On Mon, May 28, 2018 at 1:39 PM, Daniel Vetter <dan...@ffwll.ch> wrote: > On Fri, May 25, 2018 at 6:45 AM, Nayan Deshmukh > <nayan26deshm...@g

Re: [PATCH 2/3] drm/scheduler: add documentation

2018-05-28 Thread Nayan Deshmukh
If there are no more objections/suggestions I will send the patch with the changes suggested by Alex and Christian later today. Nayan On Fri, May 25, 2018 at 8:24 PM, Alex Deucher <alexdeuc...@gmail.com> wrote: > On Fri, May 25, 2018 at 12:45 AM, Nayan Deshmukh > <nayan26des

Re: [PATCH 3/4] drm/scheduler: add new function to get least loaded sched v2

2018-08-01 Thread Nayan Deshmukh
> to another - i assume that the idea int the first place, that > > you have a set of HW rings and you can utilize any of them for your jobs > (like compute rings). Correct ? > > Andrey > > > On 08/01/2018 04:20 AM, Nayan Deshmukh wrote: > > The function selects the

[PATCH] drm/scheduler: select the least loaded sched during entity init

2018-08-03 Thread Nayan Deshmukh
Instead of assigning entity to the first scheduler in the list assign it to the least loaded scheduler. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b

Re: [PATCH] drm/scheduler: select the least loaded sched during entity init

2018-08-03 Thread Nayan Deshmukh
Ah...you are correct. We will reschedule on the first job push. I didn't take that into account. Let's drop this patch then. Thanks, Nayan On Fri, Aug 3, 2018, 4:12 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 03.08.2018 um 09:06 schrieb Nayan Deshmukh: &g

Re: [PATCH 2/2] drm/scheduler: stop setting rq to NULL

2018-08-03 Thread Nayan Deshmukh
On Thu, Aug 2, 2018, 8:09 PM Andrey Grodzovsky wrote: > > > On 08/02/2018 02:43 AM, Nayan Deshmukh wrote: > > Hi Andrey, > > Good catch. I guess since both Christian and I were working on it > parallelly we didn't catch this problem. > > If it is only causing a p

Re: [PATCH 2/2] drm/scheduler: stop setting rq to NULL

2018-08-03 Thread Nayan Deshmukh
On Fri, Aug 3, 2018 at 7:17 PM Andrey Grodzovsky wrote: > > > On 08/03/2018 08:12 AM, Nayan Deshmukh wrote: > > > > On Thu, Aug 2, 2018, 8:09 PM Andrey Grodzovsky > wrote: > >> >> >> On 08/02/2018 02:43 AM, Nayan Deshmukh wrote: >> >>

Re: [PATCH 1/2] drm/scheduler: only kill entity if last user is killed v2

2018-07-30 Thread Nayan Deshmukh
Hi Christian, The code looks good to me. But I was just wondering what will happen when the last user is killed and some other user tries to push to the entity. Regards, Nayan Deshmukh On Mon, Jul 30, 2018 at 4:33 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Note w

Re: [PATCH] drm/sched: remove unneeded -Iinclude/drm compiler flag

2018-07-30 Thread Nayan Deshmukh
A minor nit-pick in the commit message, something like "With the refactored include directives under include/drm, this flag is uneeded." might be better. > > Signed-off-by: Masahiro Yamada > With or without that the patch is Acked-by: Nayan Deshmukh < nayan26deshm...@gmail.com>

Re: [PATCH 2/2] drm/scheduler: stop setting rq to NULL

2018-07-30 Thread Nayan Deshmukh
emove the entity from the scheduling list instead. > > Signed-off-by: Christian König > Good catch. Acked-by: Nayan Deshmukh > --- > drivers/gpu/drm/scheduler/gpu_scheduler.c | 35 > +++ > 1 file changed, 8 insertions(+), 27 deletions(-)

Re: [PATCH 3/4] drm/scheduler: add new function to get least loaded sched

2018-07-31 Thread Nayan Deshmukh
I will take care of that in v2. On Tue, Jul 31, 2018 at 4:57 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 31.07.2018 um 12:37 schrieb Nayan Deshmukh: > > The function selects the run queue from the rq_list with the > > least load. The load is decided

[PATCH 1/4] drm/scheduler: add a list of run queues to the entity

2018-07-31 Thread Nayan Deshmukh
These are the potential run queues on which the jobs from this entity can be scheduled. We will use this to do load balancing. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 8 include/drm/gpu_scheduler.h | 7 ++- 2 files changed, 14

[PATCH 3/4] drm/scheduler: add new function to get least loaded sched

2018-07-31 Thread Nayan Deshmukh
The function selects the run queue from the rq_list with the least load. The load is decided by the number of jobs in a scheduler. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers

[PATCH 4/4] drm/scheduler: move idle entities to scheduler with less load

2018-07-31 Thread Nayan Deshmukh
are moving. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index c67f65ad8f15..f665a84d48ef

[PATCH 0/4] drm/scheduler: add dynamic balancing

2018-07-31 Thread Nayan Deshmukh
This is the my first attempt to include dynamic balancing as part of the scheduler. I have tried to handle the easy cases first to get the basic implementation running. Please share your thoughts!! *** BLURB HERE *** Nayan Deshmukh (4): drm/scheduler: add a list of run queues to the entity

[PATCH 2/4] drm/scheduler: add counter for total jobs in scheduler

2018-07-31 Thread Nayan Deshmukh
Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 +++ include/drm/gpu_scheduler.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index a3eacc35cf98

Re: [PATCH 4/4] drm/scheduler: move idle entities to scheduler with less load

2018-07-31 Thread Nayan Deshmukh
On Tue, Jul 31, 2018 at 5:02 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 31.07.2018 um 12:37 schrieb Nayan Deshmukh: > > This is the first attempt to move entities between schedulers to > > have dynamic load balancing. We just move entities wit

[PATCH 4/4] drm/scheduler: move idle entities to scheduler with less load v2

2018-08-01 Thread Nayan Deshmukh
are moving. v2: remove unused variable and an unecessary check Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler

[PATCH 1/4] drm/scheduler: add a list of run queues to the entity

2018-08-01 Thread Nayan Deshmukh
These are the potential run queues on which the jobs from this entity can be scheduled. We will use this to do load balancing. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 8 include/drm/gpu_scheduler.h | 7 ++- 2 files changed, 14

[PATCH 2/4] drm/scheduler: add counter for total jobs in scheduler

2018-08-01 Thread Nayan Deshmukh
Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 +++ include/drm/gpu_scheduler.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index a3eacc35cf98

[PATCH 3/4] drm/scheduler: add new function to get least loaded sched v2

2018-08-01 Thread Nayan Deshmukh
The function selects the run queue from the rq_list with the least load. The load is decided by the number of jobs in a scheduler. v2: avoid using atomic read twice consecutively, instead store it locally Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 25

Re: [PATCH 2/3] drm/scheduler: add counter for total jobs in scheduler

2018-08-02 Thread Nayan Deshmukh
On Thu, Aug 2, 2018 at 11:29 AM Zhang, Jerry (Junwei) wrote: > On 08/02/2018 01:50 PM, Nayan Deshmukh wrote: > > > > > > On Thu, Aug 2, 2018 at 10:31 AM Zhang, Jerry (Junwei) < > jerry.zh...@amd.com <mailto:jerry.zh...@amd.com>> wrote: > > > >

Re: [PATCH 2/3] drm/scheduler: add counter for total jobs in scheduler

2018-08-01 Thread Nayan Deshmukh
On Thu, Aug 2, 2018 at 10:31 AM Zhang, Jerry (Junwei) wrote: > On 07/12/2018 02:36 PM, Nayan Deshmukh wrote: > > Signed-off-by: Nayan Deshmukh > > --- > > drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 +++ > > include/drm/gpu_scheduler.h | 2

Re: [PATCH 3/4] drm/scheduler: add new function to get least loaded sched v2

2018-08-02 Thread Nayan Deshmukh
on question - if the run queues belong to different > schedulers they effectively point to different rings, > > it means we allow to move (reschedule) a drm_sched_entity from one ring > to another - i assume that the idea int the first place, that > > you have a set of HW rings

Re: [PATCH 2/4] drm/scheduler: add counter for total jobs in scheduler

2018-08-02 Thread Nayan Deshmukh
> > Thanks, > Ray > > > Christian. > > > > Am 01.08.2018 um 15:15 schrieb Huang Rui: > > > On Wed, Aug 01, 2018 at 01:50:00PM +0530, Nayan Deshmukh wrote: > > > > > > This should need a commmit message. > > > > > > Thanks, > > &

Re: [PATCH 2/2] drm/scheduler: stop setting rq to NULL

2018-08-02 Thread Nayan Deshmukh
Hi Andrey, Good catch. I guess since both Christian and I were working on it parallelly we didn't catch this problem. If it is only causing a problem in push_job then we can handle it something like this:

Re: [PATCH 2/2] drm/scheduler: stop setting rq to NULL

2018-08-02 Thread Nayan Deshmukh
On Thu, Aug 2, 2018 at 12:12 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 02.08.2018 um 00:25 schrieb Andrey Grodzovsky: > > Thinking again about this change and 53d5f1e drm/scheduler: move idle > > entities to scheduler with less load v2 > > > > Looks to me like use case

Re: [PATCH] drm/scheduler: fix setting the priorty for entities

2018-08-02 Thread Nayan Deshmukh
On Wed, Aug 1, 2018 at 7:58 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Since we now deal with multiple rq we need to update all of them, not > just the current one. > > Signed-off-by: Christian König > Acked-by: Nayan Deshmukh > --- >

Re: [PATCH 1/2] drm/scheduler: only kill entity if last user is killed v2

2018-07-31 Thread Nayan Deshmukh
That makes sense. The change is Acked-by: Nayan Deshmukh < nayan26deshm...@gmail.com> On Tue, Jul 31, 2018 at 2:12 AM Andrey Grodzovsky wrote: > I believe that in this case > > if (!entity->rq) { > > DRM_ERROR... > > return; > > } > > cla

Re: [PATCH] drm/scheduler: only kill entity if last user is killed

2018-07-30 Thread Nayan Deshmukh
On Thu, Jul 26, 2018 at 5:16 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Note which task is using the entity and only kill it if the last user of > the entity is killed. This should prevent problems when entities are > leaked to > child processes. > > Signed-off-by: Christian

Re: [PATCH 1/2] drm/scheduler: modify API to avoid redundancy

2018-08-09 Thread Nayan Deshmukh
Hi Daniel, On Thu, Aug 9, 2018 at 2:27 PM Daniel Vetter wrote: > > On Fri, Jul 20, 2018 at 2:21 PM, Nayan Deshmukh > wrote: > > entity has a scheduler field and we don't need the sched argument > > in any of the functions where entity is provided. > > > &

[PATCH] drm/scheduler: fix param documentation

2018-08-09 Thread Nayan Deshmukh
We no longer have sched parameter so remove its description as well Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index

Re: [PATCH 1/2] drm/scheduler: bind job earlier to scheduler

2018-08-06 Thread Nayan Deshmukh
Hi Christian, On Mon, Aug 6, 2018 at 5:49 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Update job earlier with the scheduler it is supposed to be scheduled on. > > Otherwise we could incorrectly optimize dependencies when moving an > entity from one scheduler to another. > I

Re: [PATCH 1/2] drm/scheduler: bind job earlier to scheduler

2018-08-06 Thread Nayan Deshmukh
On Mon, Aug 6, 2018 at 6:45 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 06.08.2018 um 15:11 schrieb Nayan Deshmukh: > > Hi Christian, > > On Mon, Aug 6, 2018 at 5:49 PM Christian König < > ckoenig.leichtzumer...@gmail.com> wrote: > >>

Re: [PATCH 2/2] drm/scheduler: add last_scheduled dependency handling

2018-08-06 Thread Nayan Deshmukh
Hi Christian, Good patch. But it might lead to bad performance when we reschedule when the hardware queue of the engine on which the last job was pushed is not full. On Mon, Aug 6, 2018 at 5:49 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > This fixes accessing the

Re: [PATCH] drm/scheduler: Remove entity->rq NULL check

2018-08-06 Thread Nayan Deshmukh
I forgot about this since we started discussing possible scenarios of processes and threads. In any case, this check is redundant. Acked-by: Nayan Deshmukh < nayan26deshm...@gmail.com> Nayan On Mon, Aug 6, 2018 at 7:43 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote:

Re: [PATCH] drm/scheduler: fix last_scheduled handling

2018-08-08 Thread Nayan Deshmukh
On Wed, Aug 8, 2018 at 4:36 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 08.08.2018 um 12:55 schrieb Nayan Deshmukh: > > Hi Christian, > > On Wed, Aug 8, 2018 at 4:20 PM Christian König < > ckoenig.leichtzumer...@gmail.com> wrote: > >>

Re: [PATCH] drm/scheduler: fix last_scheduled handling

2018-08-08 Thread Nayan Deshmukh
On Wed, Aug 8, 2018 at 4:42 PM Nayan Deshmukh wrote: > > > On Wed, Aug 8, 2018 at 4:36 PM Christian König < > ckoenig.leichtzumer...@gmail.com> wrote: > >> Am 08.08.2018 um 12:55 schrieb Nayan Deshmukh: >> >> Hi Christian, >> >

Re: [PATCH] drm/scheduler: change entities rq even earlier

2018-08-08 Thread Nayan Deshmukh
reschedules. But then again this is a slight improvement over the original case so we might as well move it to a different patch. With or without this change the patch is Reviewed-by: Nayan Deshmukh < nayan26deshm...@gmail.com> > + spin_lock(>rq_lock); > + drm_sched_rq_remo

Re: [PATCH] drm/scheduler: fix last_scheduled handling

2018-08-08 Thread Nayan Deshmukh
Hi Christian, On Wed, Aug 8, 2018 at 4:20 PM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Ping, Nayan any comments on that or can I commit it? > > This is just a stripped down version of my original last_scheduled > improvement patch. > > I had missed the mail yesterday. I was

[PATCH] drm/scheduler: avoid redundant shifting of the entity

2018-08-21 Thread Nayan Deshmukh
do not remove entity from the rq if the current rq is from the least loaded scheduler. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/sched_entity.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler

Re: [PATCH] drm/scheduler: avoid redundant shifting of the entity

2018-08-21 Thread Nayan Deshmukh
My bad. How could I miss this :( Thanks for pointing it out. Nayan On Tue, Aug 21, 2018 at 4:09 PM Michel Dänzer wrote: > > On 2018-08-21 11:29 a.m., Nayan Deshmukh wrote: > > do not remove entity from the rq if the current rq is from > > the least loaded scheduler. > >

[PATCH] drm/scheduler: avoid redundant shifting of the entity v2

2018-08-21 Thread Nayan Deshmukh
do not remove entity from the rq if the current rq is from the least loaded scheduler. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/sched_entity.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler

[PATCH 2/2] drm/scheduler: remove sched field from the entity

2018-07-20 Thread Nayan Deshmukh
The scheduler of the entity is decided by the run queue on which it is queued. This patch avoids us the effort required to maintain a sync between rq and sched field when we start shifting entites among different rqs. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 1/2] drm/scheduler: modify API to avoid redundancy

2018-07-20 Thread Nayan Deshmukh
entity has a scheduler field and we don't need the sched argument in any of the functions where entity is provided. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 13 + drivers/gpu/drm/amd/amdgpu

[PATCH v2 2/2] drm/scheduler: modify args of drm_sched_entity_init

2018-07-13 Thread Nayan Deshmukh
replace run queue by a list of run queues and remove the sched arg as that is part of run queue itself Signed-off-by: Nayan Deshmukh Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +-- drivers/gpu/drm/amd

[PATCH v2 1/2] drm/scheduler: add a pointer to scheduler in the rq

2018-07-13 Thread Nayan Deshmukh
This patch is in preparation for a better load balancing in scheduler. It allows us to associate entities with the run queues instead of binding them to a scheduler. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 6 -- include/drm/gpu_scheduler.h

Re: [PATCH v2 1/2] drm/scheduler: add a pointer to scheduler in the rq

2018-07-13 Thread Nayan Deshmukh
I forgot to add these: On Fri, Jul 13, 2018 at 3:21 PM Nayan Deshmukh wrote: > > This patch is in preparation for a better load balancing in > scheduler. It allows us to associate entities with the > run queues instead of binding them to a scheduler. > > Signed-off-by: Nayan

Re: [PATCH 3/3] drm/scheduler: modify args of drm_sched_entity_init

2018-07-13 Thread Nayan Deshmukh
On Thu, Jul 12, 2018 at 11:21 PM Eric Anholt wrote: > > Nayan Deshmukh writes: > > diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c > > b/drivers/gpu/drm/scheduler/gpu_scheduler.c > > index 3dc1a4f07e3f..b2dbd1c1ba69 100644 > > --- a/drivers/gpu/drm/sched

[PATCH 3/3] drm/scheduler: modify args of drm_sched_entity_init

2018-07-12 Thread Nayan Deshmukh
replace run queue by a list of run queues and remove the sched arg as that is part of run queue itself Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4

[PATCH 0/3] drm/scheduler: preparation for load balancing

2018-07-12 Thread Nayan Deshmukh
, Nayan Deshmukh Nayan Deshmukh (3): drm/scheduler: add a pointer to scheduler in the rq drm/scheduler: add counter for total jobs in scheduler drm/scheduler: modify args of drm_sched_entity_init drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

[PATCH 1/3] drm/scheduler: add a pointer to scheduler in the rq

2018-07-12 Thread Nayan Deshmukh
Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 6 -- include/drm/gpu_scheduler.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index

[PATCH 2/3] drm/scheduler: add counter for total jobs in scheduler

2018-07-12 Thread Nayan Deshmukh
Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 +++ include/drm/gpu_scheduler.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index 429b1328653a

Re: [PATCH 3/3] drm/scheduler: modify args of drm_sched_entity_init

2018-07-12 Thread Nayan Deshmukh
On Thu, Jul 12, 2018 at 12:07 PM Nayan Deshmukh wrote: > > replace run queue by a list of run queues and remove the > sched arg as that is part of run queue itself > > Signed-off-by: Nayan Deshmukh > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 ++-- > dr

Re: [PATCH] drm/sched: Extend the documentation.

2018-04-05 Thread Nayan Deshmukh
On Thu, Apr 5, 2018 at 6:59 PM, Daniel Vetter wrote: > On Thu, Apr 5, 2018 at 3:27 PM, Alex Deucher wrote: >> On Thu, Apr 5, 2018 at 2:16 AM, Daniel Vetter wrote: >>> On Thu, Apr 5, 2018 at 12:32 AM, Eric Anholt wrote:

Re: [PATCH] drm/scheduler: fix param documentation

2018-03-27 Thread Nayan Deshmukh
On Tue, Mar 27, 2018 at 1:47 PM, Daniel Vetter <dan...@ffwll.ch> wrote: > On Mon, Mar 26, 2018 at 08:51:14PM +0530, Nayan Deshmukh wrote: >> Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> > > You might want to add a kerneldoc page in Documentation/gpu/schedule

[PATCH 3/3] drm/scheduler: move the tracepoints file from the include directory

2018-03-29 Thread Nayan Deshmukh
Move it with the scheduler code. This is mostly a straight forward rename with no code change except for updating the TRACE_INCLUDE_PATH Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> Suggested-by: Christian König <christian.koe...@amd.com> --- drivers/gpu/d

[PATCH 0/3] Minor code cleanups in drm/scheduler

2018-03-29 Thread Nayan Deshmukh
The series is based on drm-next. The 2nd patch also affects amdgpu and etnaviv drivers. Nayan Deshmukh (3): drm/scheduler: fix param documentation drm/scheduler: remove unused parameter drm/scheduler: move the tracepoints file from the include directory drivers/gpu/drm/amd/amdgpu

[PATCH 2/3] drm/scheduler: remove unused parameter

2018-03-29 Thread Nayan Deshmukh
this patch also effect the amdgpu and etnaviv drivers which use the function drm_sched_entity_init Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> Suggested-by: Christian König <christian.koe...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- drivers/gpu/dr

[PATCH 1/3] drm/scheduler: fix param documentation

2018-03-29 Thread Nayan Deshmukh
There is no @kernel parameter anymore and document the @guilty parameter Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 ++- 1 file changed, 2 insertions(+), 1 delet

Re: [PATCH] drm/scheduler: fix param documentation

2018-03-29 Thread Nayan Deshmukh
On Thu, Mar 29, 2018 at 8:56 PM, Alex Deucher <alexdeuc...@gmail.com> wrote: > On Tue, Mar 27, 2018 at 1:29 PM, Nayan Deshmukh > <nayan26deshm...@gmail.com> wrote: >> On Tue, Mar 27, 2018 at 1:47 PM, Daniel Vetter <dan...@ffwll.ch> wrote: >>> On Mon,

Re: [PATCH] drm/scheduler: remove incorrect param documentation

2018-03-26 Thread Nayan Deshmukh
s, > Christian. > > > Am 26.03.2018 um 17:29 schrieb Nayan Deshmukh: >> >> I am not removing jobs parameters as of now as it will lead to changes >> in all the calls to this function and will affect the etnaviv patches. >> >> Regards, >> Nayan.

[PATCH] drm/scheduler: fix param documentation

2018-03-26 Thread Nayan Deshmukh
There is no @kernel parameter anymore and document the @guilty parameter Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/gpu_schedule

[PATCH] drm/scheduler: fix param documentation

2018-03-26 Thread Nayan Deshmukh
Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index 0d95888ccc3e..1d368b

Re: [PATCH] drm/scheduler: remove incorrect param documentation

2018-03-26 Thread Nayan Deshmukh
I am not removing jobs parameters as of now as it will lead to changes in all the calls to this function and will affect the etnaviv patches. Regards, Nayan. On Sun, Mar 25, 2018 at 4:59 PM, Christian König <christian.koe...@amd.com> wrote: > Am 25.03.2018 um 13:21 schrieb Nayan

[PATCH] drm/scheduler: remove incorrect param documentation

2018-03-25 Thread Nayan Deshmukh
Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index 0d95888ccc3e..27fdda1264f7 100644 --- a/d

Re: [PATCH] drm/scheduler: remove incorrect param documentation

2018-03-25 Thread Nayan Deshmukh
On Sun, Mar 25, 2018 at 4:44 PM, Christian König <christian.koe...@amd.com> wrote: > Am 25.03.2018 um 13:09 schrieb Nayan Deshmukh: >> >> Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> >> --- >> drivers/gpu/drm/scheduler/gpu_scheduler.

Re: [PATCH 1/2] drm/sched: add drm_sched_start_timeout helper

2018-10-08 Thread Nayan Deshmukh
On Mon, Oct 8, 2018 at 8:36 PM Christian König wrote: > > Cleanup starting the timeout a bit. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/scheduler/sched_main.c | 29 + > 1 file changed, 17 insertions(+), 12 deletions(-) > > diff --git

Re: [PATCH 2/2] drm/sched: fix timeout handling

2018-10-08 Thread Nayan Deshmukh
Thanks for all the explanations. Looks like this part of scheduler has a lot of bugs. On Tue, Oct 9, 2018 at 2:55 AM Christian König wrote: > > Am 08.10.2018 um 19:40 schrieb Nayan Deshmukh: > > Hi Christian, > > > > I am a bit confused with this patch. It will be bette

Re: [PATCH 1/2] drm/sched: add drm_sched_start_timeout helper

2018-10-08 Thread Nayan Deshmukh
On Tue, Oct 9, 2018 at 2:24 AM Christian König wrote: > > Am 08.10.2018 um 16:40 schrieb Nayan Deshmukh: > > On Mon, Oct 8, 2018 at 8:36 PM Christian König > > wrote: > >> Cleanup starting the timeout a bit. > >> > >> Signed-off-by: Christian Kön

Re: [PATCH 1/4] drm/scheduler: make sure timer is restarted

2018-10-17 Thread Nayan Deshmukh
Patch 1 and 2 are Reviewed-by: Nayan Deshmukh On Wed, Oct 17, 2018 at 12:30 AM Grodzovsky, Andrey wrote: > > Patches 1-3 Reviewed-by: Andrey Grodzovsky > > Patch 4 Acked-by: Andrey Grodzovsky > > Andrey > > > On 10/16/2018 07:55 AM, Christian König wrote: >

Re: [PATCH] drm/scheduler: use hw_rq_count for load calculation

2018-10-23 Thread Nayan Deshmukh
t; runqueues even when they are idle. > > Christian. > > > > > Signed-off-by: Nayan Deshmukh > > --- > > drivers/gpu/drm/scheduler/sched_entity.c | 14 ++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/drivers/gpu/drm/schedul

[PATCH v2] drm/scheduler: use hw_rq_count for load calculation

2018-10-28 Thread Nayan Deshmukh
are same Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/sched_entity.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 3e22a54a99c2..cfe48df6621d 100644

[PATCH] drm/scheduler: use hw_rq_count for load calculation

2018-10-18 Thread Nayan Deshmukh
If the hardware queue for a scheduler is empty then we don't need to the shift the entities from their current scheduler as they are not getting scheduled because of some dependency. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/sched_entity.c | 14 ++ 1 file changed

Re: [PATCH v2] drm/scheduler: remove timeout work_struct from drm_sched_job

2018-10-04 Thread Nayan Deshmukh
Hi Christian, On Thu, Sep 27, 2018 at 12:55 AM Nayan Deshmukh wrote: > > Hi Christian, > > > On Wed, Sep 26, 2018, 10:13 AM Christian König > wrote: >> >> Am 26.09.2018 um 09:39 schrieb Lucas Stach: >> > Hi Nayan, >> > >> > Am Mit

Re: [PATCH 2/2] drm/sched: fix timeout handling v2

2018-10-09 Thread Nayan Deshmukh
On Tue, Oct 9, 2018 at 8:20 PM Christian König wrote: > > We need to make sure that we don't race between job completion and > timeout. > > v2: put revert label after calling the handling manually > > Signed-off-by: Christian König Reviewed-by: Nayan Deshmukh > --- >

Re: [PATCH 1/2] drm/sched: add drm_sched_start_timeout helper

2018-10-09 Thread Nayan Deshmukh
On Tue, Oct 9, 2018 at 8:20 PM Christian König wrote: > > Cleanup starting the timeout a bit. > > Signed-off-by: Christian König Reviewed-by: Nayan Deshmukh > --- > drivers/gpu/drm/scheduler/sched_main.c | 29 + > 1 file changed, 17 insert

Re: [PATCH 2/2] drm/sched: fix timeout handling

2018-10-08 Thread Nayan Deshmukh
Hi Christian, I am a bit confused with this patch. It will be better if you can explain what these 3 functions are supposed to do. From my understanding this is what they are supposed to do: 1. drm_sched_job_timedout: This function is called when a job has been executing for more than "timeout"

[PATCH v2] drm/scheduler: remove timeout work_struct from drm_sched_job

2018-09-21 Thread Nayan Deshmukh
having a delayed work item per job is redundant as we only need one per scheduler to track the time out the currently executing job. v2: the first element of the ring mirror list is the currently executing job so we don't need a additional variable for it Signed-off-by: Nayan Deshmukh Suggested

Re: [PATCH v2] drm/scheduler: remove timeout work_struct from drm_sched_job

2018-09-26 Thread Nayan Deshmukh
Hi Christian, On Wed, Sep 26, 2018, 10:13 AM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 26.09.2018 um 09:39 schrieb Lucas Stach: > > Hi Nayan, > > > > Am Mittwoch, den 26.09.2018, 02:09 +0900 schrieb Nayan Deshmukh: > >> having a delayed

[PATCH] drm/etnaviv: fix build error due to change in scheduler struct

2018-09-27 Thread Nayan Deshmukh
The work_tdr field was moved from drm_sched_job to drm_gpu_scheduler as part of a previous patch. Fixes: 4f07d88d8534 drm/scheduler: remove timeout work_struct from drm_sched_job Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] drm/etnaviv: fix build error due to change in scheduler struct

2018-09-27 Thread Nayan Deshmukh
On Thu, Sep 27, 2018, 9:03 AM Lucas Stach wrote: > Am Donnerstag, den 27.09.2018, 08:27 +0200 schrieb Nayan Deshmukh: > > The work_tdr field was moved from drm_sched_job to drm_gpu_scheduler > > as part of a previous patch. > > > > Fixes: 4f07d88d8534 drm/scheduler:

Re: [PATCH 2/2] drm/scheduler: remove timeout work_struct from drm_sched_job

2018-09-20 Thread Nayan Deshmukh
On Wed, Sep 19, 2018, 9:31 PM Christian König wrote: > Am 18.09.2018 um 18:17 schrieb Nayan Deshmukh: > > having a delayed work item per job is redundant as we only need one > > per scheduler to track the time out the currently executing job. > > Well that looks simpler th

[PATCH] drm/v3d: fix build error due to change in scheduler struct

2018-09-27 Thread Nayan Deshmukh
The work_tdr field was moved from drm_sched_job to drm_gpu_scheduler as part of a previous patch. Fixes: 4f07d88d8534 drm/scheduler: remove timeout work_struct from drm_sched_job Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/v3d/v3d_sched.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2] drm/scheduler: remove timeout work_struct from drm_sched_job

2018-09-25 Thread Nayan Deshmukh
having a delayed work item per job is redundant as we only need one per scheduler to track the time out the currently executing job. v2: the first element of the ring mirror list is the currently executing job so we don't need a additional variable for it Signed-off-by: Nayan Deshmukh Suggested

[PATCH 1/2] drm/scheduler: add a current job field to scheduler

2018-09-18 Thread Nayan Deshmukh
Which points to the job running on the hardware. This is useful when we need to access the currently executing job from the scheduler. Signed-off-by: Nayan Deshmukh --- drivers/gpu/drm/scheduler/sched_main.c | 17 +++-- include/drm/gpu_scheduler.h| 2 ++ 2 files changed

[PATCH 2/2] drm/scheduler: remove timeout work_struct from drm_sched_job

2018-09-18 Thread Nayan Deshmukh
having a delayed work item per job is redundant as we only need one per scheduler to track the time out the currently executing job. Signed-off-by: Nayan Deshmukh Suggested-by: Christian König --- drivers/gpu/drm/scheduler/sched_main.c | 16 +--- include/drm/gpu_scheduler.h

Re: [PATCH 1/2] drm/scheduler: add a current job field to scheduler

2018-09-18 Thread Nayan Deshmukh
Hi Christian, Yes you are correct. My bad. Do you have any comments on the second patch? I will drop this patch and rebase the second one. Regards, Nayan On Wed, Sep 19, 2018, 2:09 AM Koenig, Christian wrote: > Am 18.09.2018 um 18:17 schrieb Nayan Deshmukh: > > Which points t