public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhaoyu Liu <zackary.liu.pro@gmail.com>
To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	bristot@redhat.com, vschneid@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] sched/pelt: rename init_entity_runnable_average()
Date: Thu, 23 Jun 2022 00:20:30 +0800	[thread overview]
Message-ID: <20220622162025.GA12196@pc> (raw)

In commit 0dacee1bfa70 ("sched/pelt: Remove unused runnable load average"),
sa->runnable_load_avg was deleted from init_entity_runnable_average(),
and now it only init sa->load_avg inside of the function,
so rename the function to init_entity_load_average() is more appropriate.

Signed-off-by: Zhaoyu Liu <zackary.liu.pro@gmail.com>
---
 kernel/sched/core.c  | 3 +--
 kernel/sched/fair.c  | 6 +++---
 kernel/sched/sched.h | 2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 263d76489a48..224ca514e9d8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4580,8 +4580,7 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)
 	else
 		p->sched_class = &fair_sched_class;
 
-	init_entity_runnable_average(&p->se);
-
+	init_entity_load_average(&p->se);
 
 #ifdef CONFIG_SCHED_INFO
 	if (likely(sched_info_on()))
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ed32f66bbd3d..6bc7eaf88c59 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -784,7 +784,7 @@ static unsigned long task_h_load(struct task_struct *p);
 static unsigned long capacity_of(int cpu);
 
 /* Give new sched_entity start runnable values to heavy its load in infant time */
-void init_entity_runnable_average(struct sched_entity *se)
+void init_entity_load_average(struct sched_entity *se)
 {
 	struct sched_avg *sa = &se->avg;
 
@@ -871,7 +871,7 @@ void post_init_entity_util_avg(struct task_struct *p)
 }
 
 #else /* !CONFIG_SMP */
-void init_entity_runnable_average(struct sched_entity *se)
+void init_entity_load_average(struct sched_entity *se)
 {
 }
 void post_init_entity_util_avg(struct task_struct *p)
@@ -11510,7 +11510,7 @@ int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
 
 		init_cfs_rq(cfs_rq);
 		init_tg_cfs_entry(tg, cfs_rq, se, i, parent->se[i]);
-		init_entity_runnable_average(se);
+		init_entity_load_average(se);
 	}
 
 	return 1;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 5b14b6b4495d..349b423ea8a6 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2330,7 +2330,7 @@ extern void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se);
 #define MAX_BW			((1ULL << MAX_BW_BITS) - 1)
 unsigned long to_ratio(u64 period, u64 runtime);
 
-extern void init_entity_runnable_average(struct sched_entity *se);
+extern void init_entity_load_average(struct sched_entity *se);
 extern void post_init_entity_util_avg(struct task_struct *p);
 
 #ifdef CONFIG_NO_HZ_FULL
-- 
2.17.1


             reply	other threads:[~2022-06-22 16:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 16:20 Zhaoyu Liu [this message]
2022-07-15 14:31 ` [PATCH] sched/pelt: rename init_entity_runnable_average() Zackary Liu

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=20220622162025.GA12196@pc \
    --to=zackary.liu.pro@gmail.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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