Skip to contentSkip to conversation

drm/scheduler: fix drm_sched_get_cleanup_job

PATCH In review Kent Russell 3 participants 4 messages Apr 14, 2020 – Apr 15, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/scheduler: fix drm_sched_get_cleanup_job

From: Christian König <[email protected]>

We are racing to initialize sched->thread here, just always check the current thread.

---
 drivers/gpu/drm/scheduler/sched_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/scheduler/sched_main.c +1 -1
index 8e731ed0d9d9..2f319102ae9f 100644
@@ -676,7 +676,7 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
 	 */
 	if ((sched->timeout != MAX_SCHEDULE_TIMEOUT &&
 	    !cancel_delayed_work(&sched->work_tdr)) ||
-	    __kthread_should_park(sched->thread))
+	    kthread_should_park())
 		return NULL;
 
 	spin_lock(&sched->job_list_lock);
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

Andrey

Quoted 16 lines · Kent Russell

From: Christian König <[email protected]>

We are racing to initialize sched->thread here, just always check the current thread.

---
  drivers/gpu/drm/scheduler/sched_main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/scheduler/sched_main.c +0 -0
index 8e731ed0d9d9..2f319102ae9f 100644

drivers/gpu/drm/scheduler/sched_main.c drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched) · line 682

Quoted 8 lines
drivers/gpu/drm/scheduler/sched_main.c +1 -1
@@ -676,7 +676,7 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
  	 */
  	if ((sched->timeout != MAX_SCHEDULE_TIMEOUT &&
  	    !cancel_delayed_work(&sched->work_tdr)) ||
-	    __kthread_should_park(sched->thread))
+	    kthread_should_park())
  		return NULL;
 
  	spin_lock(&sched->job_list_lock);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw

Sorry for the holiday/vacation/COVID-19 delay. I've just pushed this patch into drm-misc-fixes.

I assume it already landed in our internal branches?

Thanks,
Christian.

Am 14.04.20 um 16:33 schrieb Andrey Grodzovsky:

Quoted 16 lines

Andrey

Quoted 11 lines · Kent Russell

From: Christian König <[email protected]>

We are racing to initialize sched->thread here, just always check the current thread.

---
  drivers/gpu/drm/scheduler/sched_main.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
Quoted 7 lines
drivers/gpu/drm/scheduler/sched_main.c +0 -0
index 8e731ed0d9d9..2f319102ae9f 100644
@@ -676,7 +676,7 @@ drm_sched_get_cleanup_job(struct 
 drm_gpu_scheduler *sched)
        */
Quoted 6 lines

      if ((sched->timeout != MAX_SCHEDULE_TIMEOUT && !cancel_delayed_work(&sched->work_tdr)) || -        __kthread_should_park(sched->thread)) +        kthread_should_park())
          return NULL; spin_lock(&sched->job_list_lock);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw

[AMD Official Use Only - Internal Distribution Only]

It's all good. I pushed a copy to amd-staging-drm-next, reviewed by Andrey. Thanks for pushing it to drm-misc-fixes!

Kent

Quoted 32 lines

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Wednesday, April 15, 2020 6:36 AM
To: Grodzovsky, Andrey <[email protected]>; Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/scheduler: fix drm_sched_get_cleanup_job

Sorry for the holiday/vacation/COVID-19 delay. I've just pushed this patch into drm-misc-fixes.

I assume it already landed in our internal branches?

Thanks,
Christian.

Am 14.04.20 um 16:33 schrieb Andrey Grodzovsky:

Quoted 16 lines

Andrey

Quoted 11 lines · Kent Russell

From: Christian König <[email protected]>

We are racing to initialize sched->thread here, just always check the current thread.

---
  drivers/gpu/drm/scheduler/sched_main.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/scheduler/sched_main.c +0 -0
index 8e731ed0d9d9..2f319102ae9f 100644
@@ -676,7 +676,7 @@ drm_sched_get_cleanup_job(struct
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/scheduler/sched_main.c +0 -0
 drm_gpu_scheduler *sched)
        */

      if ((sched->timeout != MAX_SCHEDULE_TIMEOUT && !cancel_delayed_work(&sched->work_tdr)) || -        __kthread_should_park(sched->thread)) +        kthread_should_park())
          return NULL; spin_lock(&sched->job_list_lock);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx