From 0392f7d17117bfed6ab276fc5321364d4536f5e8 Mon Sep 17 00:00:00 2001 From: Soohyun Kim Date: Wed, 28 Mar 2018 16:15:33 +0900 Subject: [PATCH] [COMMON] sched/rt : fix unnecessary operation for PELT Change-Id: I3579565f8025b151b303862a710374963197731e Signed-off-by: Soohyun Kim --- kernel/sched/fair.c | 2 -- kernel/sched/rt.c | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ba6c2b1f9f60..ec584ec4935c 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8570,7 +8570,6 @@ static void update_blocked_averages(int cpu) if (cfs_rq_is_decayed(cfs_rq)) list_del_leaf_cfs_rq(cfs_rq); } - update_rt_rq_load_avg(rq_clock_task(rq), cpu, &rq->rt, 0); #ifdef CONFIG_NO_HZ_COMMON rq->last_blocked_load_update_tick = jiffies; #endif @@ -8633,7 +8632,6 @@ static inline void update_blocked_averages(int cpu) rq_lock_irqsave(rq, &rf); update_rq_clock(rq); update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq); - update_rt_rq_load_avg(rq_clock_task(rq), cpu, &rq->rt, 0); #ifdef CONFIG_NO_HZ_COMMON rq->last_blocked_load_update_tick = jiffies; #endif diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 5e9b2fecf01e..70bf66acf8d4 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1674,7 +1674,8 @@ void sync_rt_entity_load_avg(struct sched_rt_entity *rt_se) u64 last_update_time; last_update_time = rt_rq_last_update_time(rt_rq); - update_rt_load_avg(last_update_time, rt_se); + __update_load_avg(last_update_time, cpu_of(rq_of_rt_rq(rt_rq)), + &rt_se->avg, 0, 0, NULL); } /* @@ -1983,8 +1984,6 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p) update_curr_rt(rq); - update_rt_rq_load_avg(rq_clock_task(rq), cpu_of(rq), &rq->rt, 1); - /* * The previous task needs to be made eligible for pushing * if it is still active @@ -3089,7 +3088,6 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued) u64 now = rq_clock_task(rq); update_curr_rt(rq); - update_rt_rq_load_avg(now, cpu_of(rq), &rq->rt, 1); for_each_sched_rt_entity(rt_se) update_rt_load_avg(now, rt_se); -- 2.20.1