walt_cfs: MVP: rearrange priorities

Update to prefer low_latency and pipeline as having higher priority than
others.

Change-Id: Ib5ba973d483cf923f886a906a158907335ccab9b
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
This commit is contained in:
Abhijeet Dharmapurikar 2022-08-04 12:37:33 -07:00 committed by Sai Harshini Nimmala
parent f970f604f2
commit 90ec01ea12
2 changed files with 7 additions and 2 deletions

View File

@ -923,9 +923,11 @@ static inline bool walt_flag_test(struct task_struct *p, enum walt_flags feature
#define WALT_MVP_SLICE 3000000U
#define WALT_MVP_LIMIT (4 * WALT_MVP_SLICE)
/* higher number, better priority */
#define WALT_RTG_MVP 0
#define WALT_BINDER_MVP 1
#define WALT_TASK_BOOST_MVP 2
#define WALT_LL_PIPE_MVP 3
#define WALT_NOT_MVP -1

View File

@ -1042,14 +1042,17 @@ static void binder_restore_priority_hook(void *data,
*/
int walt_get_mvp_task_prio(struct task_struct *p)
{
if (walt_procfs_low_latency_task(p) ||
walt_pipeline_low_latency_task(p))
return WALT_LL_PIPE_MVP;
if (per_task_boost(p) == TASK_BOOST_STRICT_MAX)
return WALT_TASK_BOOST_MVP;
if (walt_binder_low_latency_task(p))
return WALT_BINDER_MVP;
if (task_rtg_high_prio(p) || walt_procfs_low_latency_task(p) ||
walt_pipeline_low_latency_task(p))
if (task_rtg_high_prio(p))
return WALT_RTG_MVP;
return WALT_NOT_MVP;