linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] schied/fair: Skip updating "contrib" without load
@ 2019-12-06 16:14 Peng Wang
  2019-12-09 16:16 ` Peter Zijlstra
  2019-12-13  3:45 ` [PATCH v2] schied/fair: Skip calculating @contrib " Peng Wang
  0 siblings, 2 replies; 7+ messages in thread
From: Peng Wang @ 2019-12-06 16:14 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman
  Cc: linux-kernel, Peng Wang

We only update load_sum/runnable_load_sum/util_sum with
decayed old sum when load is clear.

Signed-off-by: Peng Wang <rocking@linux.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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-17 12:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 16:14 [PATCH] schied/fair: Skip updating "contrib" without load Peng Wang
2019-12-09 16:16 ` Peter Zijlstra
2019-12-11 12:16   ` Peng Wang
2019-12-13  3:45 ` [PATCH v2] schied/fair: Skip calculating @contrib " Peng Wang
2019-12-13  9:21   ` Vincent Guittot
2019-12-13 12:13   ` Peter Zijlstra
2019-12-17 12:39   ` [tip: sched/core] " tip-bot2 for Peng Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).