From: Vincent Guittot <vincent.guittot@linaro.org>
To: peterz@infradead.org, mingo@kernel.org,
linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com,
kernellwp@gmail.com
Cc: yuyang.du@intel.com, Morten.Rasmussen@arm.com,
linaro-kernel@lists.linaro.org, pjt@google.com,
bsegall@google.com, Vincent Guittot <vincent.guittot@linaro.org>
Subject: [PATCH 1/7 v4] sched: factorize attach entity
Date: Mon, 26 Sep 2016 14:19:47 +0200 [thread overview]
Message-ID: <1474892393-5095-2-git-send-email-vincent.guittot@linaro.org> (raw)
In-Reply-To: <1474892393-5095-1-git-send-email-vincent.guittot@linaro.org>
Factorize post_init_entity_util_avg and part of attach_task_cfs_rq
in one function attach_entity_cfs_rq
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
kernel/sched/fair.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 986c10c..e8ed8d1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -697,9 +697,7 @@ void init_entity_runnable_average(struct sched_entity *se)
}
static inline u64 cfs_rq_clock_task(struct cfs_rq *cfs_rq);
-static int update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq, bool update_freq);
-static void update_tg_load_avg(struct cfs_rq *cfs_rq, int force);
-static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se);
+static void attach_entity_cfs_rq(struct sched_entity *se);
/*
* With new tasks being created, their initial util_avgs are extrapolated
@@ -764,9 +762,7 @@ void post_init_entity_util_avg(struct sched_entity *se)
}
}
- update_cfs_rq_load_avg(now, cfs_rq, false);
- attach_entity_load_avg(cfs_rq, se);
- update_tg_load_avg(cfs_rq, false);
+ attach_entity_cfs_rq(se);
}
#else /* !CONFIG_SMP */
@@ -8501,9 +8497,8 @@ static void detach_task_cfs_rq(struct task_struct *p)
update_tg_load_avg(cfs_rq, false);
}
-static void attach_task_cfs_rq(struct task_struct *p)
+static void attach_entity_cfs_rq(struct sched_entity *se)
{
- struct sched_entity *se = &p->se;
struct cfs_rq *cfs_rq = cfs_rq_of(se);
u64 now = cfs_rq_clock_task(cfs_rq);
@@ -8519,6 +8514,14 @@ static void attach_task_cfs_rq(struct task_struct *p)
update_cfs_rq_load_avg(now, cfs_rq, false);
attach_entity_load_avg(cfs_rq, se);
update_tg_load_avg(cfs_rq, false);
+}
+
+static void attach_task_cfs_rq(struct task_struct *p)
+{
+ struct sched_entity *se = &p->se;
+ struct cfs_rq *cfs_rq = cfs_rq_of(se);
+
+ attach_entity_cfs_rq(se);
if (!vruntime_normalized(p))
se->vruntime += cfs_rq->min_vruntime;
--
1.9.1
next prev parent reply other threads:[~2016-09-26 12:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 12:19 [PATCH 0/7 v4] sched: reflect sched_entity move into task_group's load Vincent Guittot
2016-09-26 12:19 ` Vincent Guittot [this message]
2016-10-05 9:38 ` [PATCH 1/7 v4] sched: factorize attach entity Dietmar Eggemann
2016-10-06 23:11 ` Vincent Guittot
2016-10-12 10:59 ` Vincent Guittot
2016-10-12 11:12 ` Dietmar Eggemann
2016-09-26 12:19 ` [PATCH 2/7 v4] sched: fix hierarchical order in rq->leaf_cfs_rq_list Vincent Guittot
2016-09-26 12:19 ` [PATCH 3/7 v4] sched: factorize PELT update Vincent Guittot
2016-09-26 12:19 ` [PATCH 4/7 v4] sched: propagate load during synchronous attach/detach Vincent Guittot
2016-09-26 12:19 ` [PATCH 5/7 v4] sched: propagate asynchrous detach Vincent Guittot
2016-10-12 15:03 ` Dietmar Eggemann
2016-10-12 15:45 ` Vincent Guittot
2016-10-12 16:18 ` Dietmar Eggemann
2016-09-26 12:19 ` [PATCH 6/7 v4] sched: fix task group initialization Vincent Guittot
2016-09-26 12:19 ` [PATCH 7/7 v4] sched: fix wrong utilization accounting when switching to fair class Vincent Guittot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474892393-5095-2-git-send-email-vincent.guittot@linaro.org \
--to=vincent.guittot@linaro.org \
--cc=Morten.Rasmussen@arm.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=kernellwp@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=yuyang.du@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®