From 62990a3df04820530872bdb422dec4b05746d891 Mon Sep 17 00:00:00 2001 From: "lakkyung.jung" Date: Fri, 4 May 2018 20:16:53 +0900 Subject: [PATCH] sched: fair/ems: Add schedtune_util_est Change-Id: I0a0f1723356683829ce709ec750f4f013aa1c75b Signed-off-by: lakkyung.jung --- kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 30996c0860db..529af4b13ffc 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3713,11 +3713,12 @@ static inline unsigned long task_util(struct task_struct *p) return READ_ONCE(p->se.avg.util_avg); } -static inline unsigned long _task_util_est(struct task_struct *p) +inline unsigned long _task_util_est(struct task_struct *p) { struct util_est ue = READ_ONCE(p->se.avg.util_est); - return max(ue.ewma, ue.enqueued); + return schedtune_util_est_en(p) ? max(ue.ewma, ue.enqueued) + : task_util(p); } unsigned long task_util_est(struct task_struct *p) -- 2.20.1