OSDN Git Service

amd/scheduler:imple job skip feature(v3)
authorMonk Liu <Monk.Liu@amd.com>
Wed, 25 Oct 2017 08:21:08 +0000 (16:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:41:30 +0000 (16:41 -0500)
commit48f05f2955e4a3183b219d6dfdb1c28e17d03da7
treea444ff5d0e61958d30b7105f999d8695e994581b
parent3a393cf96ab38c72565fda106a825302828b7e05
amd/scheduler:imple job skip feature(v3)

jobs are skipped under two cases
1)when the entity behind this job marked guilty, the job
poped from this entity's queue will be dropped in sched_main loop.

2)in job_recovery(), skip the scheduling job if its karma detected
above limit, and also skipped as well for other jobs sharing the
same fence context. this approach is becuase job_recovery() cannot
access job->entity due to entity may already dead.

v2:
some logic fix

v3:
when entity detected guilty, don't drop the job in the poping
stage, instead set its fence error as -ECANCELED

in run_job(), skip the scheduling either:1) fence->error < 0
or 2) there was a VRAM LOST occurred on this job.
this way we can unify the job skipping logic.

with this feature we can introduce new gpu recover feature.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c