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 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. > > &

Re: [PATCH] drm/amdgpu: fix the null pointer to get timeline by scheduler fence

2018-08-08 Thread Nayan Deshmukh
On Wed, Aug 8, 2018 at 4:58 PM Huang Rui wrote: > On Wed, Aug 08, 2018 at 03:10:07PM +0800, Koenig, Christian wrote: > > Yeah that is a known issue, but this solution is not correct either. > > > > See the scheduler where the job is execute on is simply not determined > > yet when we want to trac

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 Deshm

[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: 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 2/4] drm/scheduler: add counter for total jobs in scheduler

2018-08-01 Thread Nayan Deshmukh
tion. :-) > > 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/3] drm/scheduler: add counter for total jobs in scheduler

2018-08-01 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 3/4] drm/scheduler: add new function to get least loaded sched v2

2018-08-01 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/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-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 4/4] drm/scheduler: move idle entities to scheduler with less load v2

2018-08-01 Thread Nayan Deshmukh
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 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

[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

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 with n

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 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
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 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

[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 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

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 K

[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/a

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 Des

[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 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

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

2018-07-11 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

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

2018-07-11 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 2/3] drm/scheduler: add counter for total jobs in scheduler

2018-07-11 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

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

2018-07-11 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 0/3] drm/scheduler: preparation for load balancing

2018-07-11 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