Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-27 Thread Luben Tuikov
So, I started fixing this, including the bug taking the next element as an entity, but it could be actually the list_head... a la your patch being fixed, and then went down the rabbit whole of also fixing drm_sched_rq_select_entity(), but the problem is that at that point we don't know if we sh

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-27 Thread Christian König
Am 27.10.22 um 11:00 schrieb broler Liew: It's very nice of you-all to finger it out that it may crash when it is the last entity in the list.   Absolutely I made a mistake about that. But I still cannot understand why we need to restart the selection from the list head when the current entity i

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-27 Thread broler Liew
It's very nice of you-all to finger it out that it may crash when it is the last entity in the list. Absolutely I made a mistake about that. But I still cannot understand why we need to restart the selection from the list head when the current entity is removed from rq. In drm_sched_rq_select_ent

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-27 Thread Luben Tuikov
On 2022-10-27 04:19, Christian König wrote: > Am 27.10.22 um 10:07 schrieb Luben Tuikov: >> On 2022-10-27 03:01, Luben Tuikov wrote: >>> On 2022-10-25 13:50, Luben Tuikov wrote: Looking... Regards, Luben On 2022-10-25 09:35, Alex Deucher wrote: > + Luben >

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-27 Thread Christian König
Am 27.10.22 um 10:07 schrieb Luben Tuikov: On 2022-10-27 03:01, Luben Tuikov wrote: On 2022-10-25 13:50, Luben Tuikov wrote: Looking... Regards, Luben On 2022-10-25 09:35, Alex Deucher wrote: + Luben On Tue, Oct 25, 2022 at 2:55 AM brolerliew wrote: When entity move from one rq to another

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-27 Thread Luben Tuikov
On 2022-10-27 03:01, Luben Tuikov wrote: > On 2022-10-25 13:50, Luben Tuikov wrote: >> Looking... >> >> Regards, >> Luben >> >> On 2022-10-25 09:35, Alex Deucher wrote: >>> + Luben >>> >>> On Tue, Oct 25, 2022 at 2:55 AM brolerliew wrote: When entity move from one rq to another, current_

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-27 Thread Luben Tuikov
On 2022-10-25 13:50, Luben Tuikov wrote: > Looking... > > Regards, > Luben > > On 2022-10-25 09:35, Alex Deucher wrote: >> + Luben >> >> On Tue, Oct 25, 2022 at 2:55 AM brolerliew wrote: >>> >>> When entity move from one rq to another, current_entity will be set to NULL >>> if it is the moving e

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-25 Thread Luben Tuikov
Looking... Regards, Luben On 2022-10-25 09:35, Alex Deucher wrote: > + Luben > > On Tue, Oct 25, 2022 at 2:55 AM brolerliew wrote: >> >> When entity move from one rq to another, current_entity will be set to NULL >> if it is the moving entity. This make entities close to rq head got >> selected

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-25 Thread Alex Deucher
+ Luben On Tue, Oct 25, 2022 at 2:55 AM brolerliew wrote: > > When entity move from one rq to another, current_entity will be set to NULL > if it is the moving entity. This make entities close to rq head got > selected more frequently, especially when doing load balance between > multiple drm_gpu

[PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-24 Thread brolerliew
When entity move from one rq to another, current_entity will be set to NULL if it is the moving entity. This make entities close to rq head got selected more frequently, especially when doing load balance between multiple drm_gpu_scheduler. Make current_entity to next when removing from rq. Signe