Message ID | 20180821092959.11733-1-nayan26deshmukh@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/scheduler: avoid redundant shifting of the entity | expand |
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. > > Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> > --- > 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/sched_entity.c > index 1416edb2642a..5cae6661ef2f 100644 > --- a/drivers/gpu/drm/scheduler/sched_entity.c > +++ b/drivers/gpu/drm/scheduler/sched_entity.c > @@ -472,6 +472,9 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity) > return; > > rq = drm_sched_entity_get_free_sched(entity); > + if (rq == entity->rq) > + return; Looks like the newly added lines use spaces for indentation. The kernel coding style uses tabs.
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 <michel@daenzer.net> 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. > > > > Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> > > --- > > 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/sched_entity.c > > index 1416edb2642a..5cae6661ef2f 100644 > > --- a/drivers/gpu/drm/scheduler/sched_entity.c > > +++ b/drivers/gpu/drm/scheduler/sched_entity.c > > @@ -472,6 +472,9 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity) > > return; > > > > rq = drm_sched_entity_get_free_sched(entity); > > + if (rq == entity->rq) > > + return; > > Looks like the newly added lines use spaces for indentation. The kernel > coding style uses tabs. > > > -- > Earthling Michel Dänzer | http://www.amd.com > Libre software enthusiast | Mesa and X developer
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 1416edb2642a..5cae6661ef2f 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -472,6 +472,9 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity) return; rq = drm_sched_entity_get_free_sched(entity); + if (rq == entity->rq) + return; + spin_lock(&entity->rq_lock); drm_sched_rq_remove_entity(entity->rq, entity); entity->rq = rq;
do not remove entity from the rq if the current rq is from the least loaded scheduler. Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> --- drivers/gpu/drm/scheduler/sched_entity.c | 3 +++ 1 file changed, 3 insertions(+)