sched/walt: check current task's mvp_list instead of mvp prio

Current task's mvp prio get from walt_get_mvp_task_prio will still be
there even if the task is not in the mvp list. For example task removed
from mvp_list due to runtime slice limition.

Change-Id: Iae5d6e420213111acd0b0e71095e0a6caffbe0aa
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
This commit is contained in:
Tengfei Fan 2021-12-20 17:02:46 +08:00 committed by Rishabh Bhatnagar
parent 68dfacdb44
commit eafe0b4e6f

View File

@ -4325,10 +4325,10 @@ static void android_rvh_build_perf_domains(void *unused, bool *eas_check)
static void walt_do_sched_yield(void *unused, struct rq *rq)
{
struct task_struct *curr = rq->curr;
int mvp_prio = walt_get_mvp_task_prio(curr);
struct walt_task_struct *wts = (struct walt_task_struct *) curr->android_vendor_data1;
lockdep_assert_held(&rq->__lock);
if (mvp_prio != WALT_NOT_MVP)
if (!list_empty(&wts->mvp_list) && wts->mvp_list.next)
walt_cfs_deactivate_mvp_task(curr);
if (per_cpu(rt_task_arrival_time, cpu_of(rq)))