diff options
author | changzhu <Changfeng.Zhu@amd.com> | 2020-03-11 14:12:52 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-03-16 23:21:32 +0300 |
commit | d164bebb95516c9dd2a63cf8c8e9fe0b13d7474e (patch) | |
tree | 00421ad1ed9ccfaa0f6c598c5ae821a093a4d0ce /drivers/gpu/drm/scheduler/sched_entity.c | |
parent | 9015d60c9ee106cef0c8b969f998ca157f401605 (diff) | |
download | linux-d164bebb95516c9dd2a63cf8c8e9fe0b13d7474e.tar.xz |
Revert "drm/scheduler: improve job distribution with multiple queues"
It needs to revert this patch to avoid amdgpu_test compute hang problem
on picasso.
This reverts commit 56822db194232c089601728d68ed078dccb97f8b.
Signed-off-by: changzhu <Changfeng.Zhu@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/scheduler/sched_entity.c')
-rw-r--r-- | drivers/gpu/drm/scheduler/sched_entity.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 90fd9c30ae5a..d631521a9679 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -148,7 +148,7 @@ static struct drm_sched_rq * drm_sched_entity_get_free_sched(struct drm_sched_entity *entity) { struct drm_sched_rq *rq = NULL; - unsigned int min_score = UINT_MAX, num_score; + unsigned int min_jobs = UINT_MAX, num_jobs; int i; for (i = 0; i < entity->num_sched_list; ++i) { @@ -159,9 +159,9 @@ drm_sched_entity_get_free_sched(struct drm_sched_entity *entity) continue; } - num_score = atomic_read(&sched->score); - if (num_score < min_score) { - min_score = num_score; + num_jobs = atomic_read(&sched->num_jobs); + if (num_jobs < min_jobs) { + min_jobs = num_jobs; rq = &entity->sched_list[i]->sched_rq[entity->priority]; } } @@ -516,7 +516,7 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job, bool first; trace_drm_sched_job(sched_job, entity); - atomic_inc(&entity->rq->sched->score); + atomic_inc(&entity->rq->sched->num_jobs); WRITE_ONCE(entity->last_user, current->group_leader); first = spsc_queue_push(&entity->job_queue, &sched_job->queue_node); |