From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nayan Deshmukh Subject: Re: [PATCH] drm/scheduler: Remove entity->rq NULL check Date: Mon, 6 Aug 2018 19:48:54 +0530 Message-ID: References: <20180803110810.2055-1-christian.koenig@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0458283343==" Return-path: Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id BEC4A6E11F for ; Mon, 6 Aug 2018 14:19:43 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id j8-v6so6948426pff.6 for ; Mon, 06 Aug 2018 07:19:43 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: ckoenig.leichtzumerken@gmail.com Cc: Maling list - DRI developers List-Id: dri-devel@lists.freedesktop.org --===============0458283343== Content-Type: multipart/alternative; boundary="000000000000fd3ab40572c4f7e4" --000000000000fd3ab40572c4f7e4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 < nayan26deshmukh@gmail.com> Nayan On Mon, Aug 6, 2018 at 7:43 PM Christian K=C3=B6nig < ckoenig.leichtzumerken@gmail.com> wrote: > Ping. Any objections to that? > > Christian. > > Am 03.08.2018 um 13:08 schrieb Christian K=C3=B6nig: > > That is superflous now. > > > > Signed-off-by: Christian K=C3=B6nig > > --- > > drivers/gpu/drm/scheduler/gpu_scheduler.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c > b/drivers/gpu/drm/scheduler/gpu_scheduler.c > > index 85908c7f913e..65078dd3c82c 100644 > > --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c > > +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c > > @@ -590,11 +590,6 @@ void drm_sched_entity_push_job(struct drm_sched_jo= b > *sched_job, > > if (first) { > > /* Add the entity to the run queue */ > > spin_lock(&entity->rq_lock); > > - if (!entity->rq) { > > - DRM_ERROR("Trying to push to a killed entity\n"); > > - spin_unlock(&entity->rq_lock); > > - return; > > - } > > drm_sched_rq_add_entity(entity->rq, entity); > > spin_unlock(&entity->rq_lock); > > drm_sched_wakeup(entity->rq->sched); > > --000000000000fd3ab40572c4f7e4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 <nayan26deshmukh@gmail.com>

Nayan

On Mon, Aug 6, 2018 = at 7:43 PM Christian K=C3=B6nig <ckoenig.leichtzumerken@gmail.com> wrote:
Ping. Any objections to that?

Christian.

Am 03.08.2018 um 13:08 schrieb Christian K=C3=B6nig:
> That is superflous now.
>
> Signed-off-by: Christian K=C3=B6nig <christian.koenig@amd.com>
> ---
>=C2=A0 =C2=A0drivers/gpu/drm/scheduler/gpu_scheduler.c | 5 -----
>=C2=A0 =C2=A01 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/d= rm/scheduler/gpu_scheduler.c
> index 85908c7f913e..65078dd3c82c 100644
> --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c
> +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c
> @@ -590,11 +590,6 @@ void drm_sched_entity_push_job(struct drm_sched_j= ob *sched_job,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0if (first) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Add the entit= y to the run queue */
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0spin_lock(&e= ntity->rq_lock);
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!entity->rq) {=
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0DRM_ERROR("Trying to push to a killed entity\n");
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0spin_unlock(&entity->rq_lock);
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0return;
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0drm_sched_rq_add= _entity(entity->rq, entity);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0spin_unlock(&= ;entity->rq_lock);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0drm_sched_wakeup= (entity->rq->sched);

--000000000000fd3ab40572c4f7e4-- --===============0458283343== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0458283343==--