From: Ingo Molnar Date: Fri, 18 Jun 2021 09:31:25 +0000 (+0200) Subject: Merge branch 'sched/urgent' into sched/core, to resolve conflicts X-Git-Tag: accepted/tizen/unified/20230118.172025~6570^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2c0931a07b7376c6291e0cfb347ad27f7b66263;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'sched/urgent' into sched/core, to resolve conflicts This commit in sched/urgent moved the cfs_rq_is_decayed() function: a7b359fc6a37: ("sched/fair: Correctly insert cfs_rq's to list on unthrottle") and this fresh commit in sched/core modified it in the old location: 9e077b52d86a: ("sched/pelt: Check that *_avg are null when *_sum are") Merge the two variants. Conflicts: kernel/sched/fair.c Signed-off-by: Ingo Molnar --- b2c0931a07b7376c6291e0cfb347ad27f7b66263 diff --cc kernel/sched/fair.c index 3af4afe,bfaa6e1..5d1a6aa --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@@ -3252,6 -3298,24 +3252,33 @@@ static inline void cfs_rq_util_change(s #ifdef CONFIG_SMP #ifdef CONFIG_FAIR_GROUP_SCHED + + static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq) + { + if (cfs_rq->load.weight) + return false; + + if (cfs_rq->avg.load_sum) + return false; + + if (cfs_rq->avg.util_sum) + return false; + + if (cfs_rq->avg.runnable_sum) + return false; + ++ /* ++ * _avg must be null when _sum are null because _avg = _sum / divider ++ * Make sure that rounding and/or propagation of PELT values never ++ * break this. ++ */ ++ SCHED_WARN_ON(cfs_rq->avg.load_avg || ++ cfs_rq->avg.util_avg || ++ cfs_rq->avg.runnable_avg); ++ + return true; + } + /** * update_tg_load_avg - update the tg's load avg * @cfs_rq: the cfs_rq whose avg changed