Re: [PATCH v2] drm/scheduler: Fix job cleanup without timeout handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 21, 2019 at 2:48 AM Koenig, Christian
<Christian.Koenig@xxxxxxx> wrote:
>
> Am 21.05.19 um 01:16 schrieb Erico Nunes:
> > [CAUTION: External Email]
> >
> > After "5918045c4ed4 drm/scheduler: rework job destruction", jobs are
> > only deleted when the timeout handler is able to be cancelled
> > successfully.
> >
> > In case no timeout handler is running (timeout == MAX_SCHEDULE_TIMEOUT),
> > job cleanup would be skipped which may result in memory leaks.
> >
> > Add the handling for the (timeout == MAX_SCHEDULE_TIMEOUT) case in
> > drm_sched_cleanup_jobs.
> >
> > Signed-off-by: Erico Nunes <nunes.erico@xxxxxxxxx>
> > Cc: Christian König <christian.koenig@xxxxxxx>
>
> Reviewed-by: Christian König <christian.koenig@xxxxxxx>
>
> Going to pick that up later today into our internal branch.

Please apply it to drm-misc-next.  that is where the other gpu
scheduler changes are.  They are not in 5.2.

Alex

>
> Thanks for the help,
> Christian.
>
> > ---
> >   drivers/gpu/drm/scheduler/sched_main.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> > index f8f0e1c19002..10d1d37e644a 100644
> > --- a/drivers/gpu/drm/scheduler/sched_main.c
> > +++ b/drivers/gpu/drm/scheduler/sched_main.c
> > @@ -630,7 +630,8 @@ static void drm_sched_cleanup_jobs(struct drm_gpu_scheduler *sched)
> >          unsigned long flags;
> >
> >          /* Don't destroy jobs while the timeout worker is running */
> > -       if (!cancel_delayed_work(&sched->work_tdr))
> > +       if (sched->timeout != MAX_SCHEDULE_TIMEOUT &&
> > +           !cancel_delayed_work(&sched->work_tdr))
> >                  return;
> >
> >
> > --
> > 2.20.1
> >
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux