diff mbox series

[v3,4/7] sched/fair: Enable CFS periodic tick to update thermal pressure

Message ID 1571014705-19646-5-git-send-email-thara.gopinath@linaro.org
State Superseded
Headers show
Series Introduce Thermal Pressure | expand

Commit Message

Thara Gopinath Oct. 14, 2019, 12:58 a.m. UTC
Introduce support in CFS periodic tick to trigger the process of
computing average thermal pressure for a cpu.

Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>

---
 kernel/sched/fair.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.1.4
diff mbox series

Patch

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 83ab35e..fe7c165 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -21,6 +21,7 @@ 
  *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
  */
 #include "sched.h"
+#include "thermal.h"
 
 #include <trace/events/sched.h>
 
@@ -7566,6 +7567,8 @@  static void update_blocked_averages(int cpu)
 		done = false;
 
 	update_blocked_load_status(rq, !done);
+
+	update_periodic_maxcap(rq);
 	rq_unlock_irqrestore(rq, &rf);
 }
 
@@ -9925,6 +9928,8 @@  static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued)
 
 	update_misfit_status(curr, rq);
 	update_overutilized_status(task_rq(curr));
+
+	update_periodic_maxcap(rq);
 }
 
 /*