drm/sched: Always trace the dependencies we wait on, to fix a race.
Subsystems (3)
PATCH 1/1 drm/sched: Always trace the dependencies we wait on, to fix a race.
The entity->dependency can go away completely once we've called drm_sched_entity_add_dependency_cb() (if the cb is called before we get around to tracing). The tracepoint is more useful if we trace every dependency instead of just ones that get callbacks installed, anyway, so just do that.
Fixes any easy-to-produce OOPS when tracing the scheduler on V3D with "perf record -a -e gpu_scheduler:.\* glxgears" and DEBUG_SLAB enabled.
--- drivers/gpu/drm/scheduler/sched_entity.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/scheduler/sched_entity.c +2 -5
@@ -440,13 +440,10 @@ struct drm_sched_job *drm_sched_entity_pop_job(struct drm_sched_entity *entity)while ((entity->dependency = sched->ops->dependency (sched_job, entity))) { +trace_drm_sched_job_wait_dep (sched_job, entity->dependency); -if (drm_sched_entity_add_dependency_cb (entity)) { - -trace_drm_sched_job_wait_dep (sched_job, - entity->dependency); +if (drm_sched_entity_add_dependency_cb (entity))return NULL ; - } }/* skip jobs from entity that marked guilty */
Signature · 1 line
2.20.0.rc1
Am 07.12.18 um 20:16 schrieb Eric Anholt:
Quoted 10 lines
The
entity->dependencycan go away completely once we've calleddrm_sched_entity_add_dependency_cb()(if the cb is called before we get around to tracing). The tracepoint is more useful if we trace every dependency instead of just ones that get callbacks installed, anyway, so just do that.Fixes any easy-to-produce OOPS when tracing the scheduler on V3D with "perf record -a -e gpu_scheduler:.\* glxgears" and
DEBUG_SLABenabled.Signed-off-by Eric Anholt <[email protected]>
Going to pick that up for upstream and will add with a CC: stable.
Thanks,
Christian.
Quoted 24 lines
--- drivers/gpu/drm/scheduler/sched_entity.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/scheduler/sched_entity.c +2
-5@@ -440,13 +440,10 @@ struct drm_sched_job *drm_sched_entity_pop_job(struct drm_sched_entity *entity)while ((entity->dependency = sched->ops->dependency (sched_job, entity))) { +trace_drm_sched_job_wait_dep (sched_job, entity->dependency); -if (drm_sched_entity_add_dependency_cb (entity)) { - -trace_drm_sched_job_wait_dep (sched_job, - entity->dependency); +if (drm_sched_entity_add_dependency_cb (entity))return NULL ; - } }/* skip jobs from entity that marked guilty */
Quoted 7 lines · Christian
Am 07.12.18 um 20:16 schrieb Eric Anholt:
Quoted 6 lines
The
entity->dependencycan go away completely once we've calleddrm_sched_entity_add_dependency_cb()(if the cb is called before we get around to tracing). The tracepoint is more useful if we trace every dependency instead of just ones that get callbacks installed, anyway, so just do that.
Quoted 8 lines
Quoted 4 lines
Fixes any easy-to-produce OOPS when tracing the scheduler on V3D with "perf record -a -e gpu_scheduler:.\* glxgears" and
DEBUG_SLABenabled.Signed-off-by Eric Anholt <[email protected]>Reviewed-by Christian König <[email protected]>Going to pick that up for upstream and will add with a CC: stable.
Looks like this got misplaced.
Christian König
reviewerAm 08.02.19 um 00:10 schrieb Eric Anholt:
Quoted 9 lines
Quoted 7 lines · Christian
Am 07.12.18 um 20:16 schrieb Eric Anholt:
Quoted 6 lines
The
entity->dependencycan go away completely once we've calleddrm_sched_entity_add_dependency_cb()(if the cb is called before we get around to tracing). The tracepoint is more useful if we trace every dependency instead of just ones that get callbacks installed, anyway, so just do that.
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Fixes any easy-to-produce OOPS when tracing the scheduler on V3D with "perf record -a -e gpu_scheduler:.\* glxgears" and
DEBUG_SLABenabled.Signed-off-by Eric Anholt <[email protected]>Reviewed-by Christian König <[email protected]>Going to pick that up for upstream and will add with a CC: stable.
Looks like this got misplaced.
My fault, pushed to our internal branch now with a CC: stable tag on it.
Christian.
Quoted 5 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel