[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1575648862-12095-1-git-send-email-rocking@linux.alibaba.com>
Date: Sat, 7 Dec 2019 00:14:22 +0800
From: Peng Wang <rocking@...ux.alibaba.com>
To: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de
Cc: linux-kernel@...r.kernel.org, Peng Wang <rocking@...ux.alibaba.com>
Subject: [PATCH] schied/fair: Skip updating "contrib" without load
We only update load_sum/runnable_load_sum/util_sum with
decayed old sum when load is clear.
Signed-off-by: Peng Wang <rocking@...ux.alibaba.com>
---
kernel/sched/pelt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
index a96db50..4392953 100644
--- a/kernel/sched/pelt.c
+++ b/kernel/sched/pelt.c
@@ -129,8 +129,9 @@ static u32 __accumulate_pelt_segments(u64 periods, u32 d1, u32 d3)
* Step 2
*/
delta %= 1024;
- contrib = __accumulate_pelt_segments(periods,
- 1024 - sa->period_contrib, delta);
+ if (load)
+ contrib = __accumulate_pelt_segments(periods,
+ 1024 - sa->period_contrib, delta);
}
sa->period_contrib = delta;
--
1.8.3.1
Powered by blists - more mailing lists