Skip to contentSkip to conversation

sched/fair: avoid !CONFIG_SMP cpufreq update callbacks for !root cfs_rq

PATCH New Jisheng Zhang 1 participant 1 message Jun 27, 2016 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sched/fair: avoid !CONFIG_SMP cpufreq update callbacks for !root cfs_rq

This is to avoid cpufreq update callbacks for for !root cgroups when !CONFIG_SMP

---

Since v1:

-fix commit msg, now I really know what the check is for, thank Peter

 kernel/sched/fair.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/sched/fair.c +2 -1
index bdcbeea..236ec5b 100644
@@ -3121,7 +3121,8 @@ static inline void update_load_avg(struct sched_entity *se, int not_used)
 	struct cfs_rq *cfs_rq = cfs_rq_of(se);
 	struct rq *rq = rq_of(cfs_rq);
 
-	cpufreq_trigger_update(rq_clock(rq));
+	if (&rq->cfs == cfs_rq)
+		cpufreq_trigger_update(rq_clock(rq));
 }
 
 static inline void
Signature · 1 line
2.8.1