From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
Steven Rostedt <rostedt@goodmis.org>,
Juri Lelli <juri.lelli@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] sched/idle,stop: Remove .get_rr_interval from sched_class
Date: Wed, 3 Jun 2020 10:03:03 +0200 [thread overview]
Message-ID: <20200603080304.16548-4-dietmar.eggemann@arm.com> (raw)
In-Reply-To: <20200603080304.16548-1-dietmar.eggemann@arm.com>
The idle task and stop task sched_classes return 0 in this function.
The single call site in sched_rr_get_interval() calls
p->sched_class->get_rr_interval() only conditional in case it is
defined. Otherwise time_slice=0 will be used.
The deadline sched class does not define it. Commit a57beec5d427
("sched: Make sched_class::get_rr_interval() optional") introduced
the default time-slice=0 for sched classes which do not provide this
function.
So .get_rr_interval for idle and stop sched_class can be removed to
shrink the code a little.
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
---
kernel/sched/idle.c | 7 -------
kernel/sched/stop_task.c | 8 --------
2 files changed, 15 deletions(-)
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index b743bf38f08f..70ea8565ae48 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -442,11 +442,6 @@ prio_changed_idle(struct rq *rq, struct task_struct *p, int oldprio)
BUG();
}
-static unsigned int get_rr_interval_idle(struct rq *rq, struct task_struct *task)
-{
- return 0;
-}
-
static void update_curr_idle(struct rq *rq)
{
}
@@ -475,8 +470,6 @@ const struct sched_class idle_sched_class = {
.task_tick = task_tick_idle,
- .get_rr_interval = get_rr_interval_idle,
-
.prio_changed = prio_changed_idle,
.switched_to = switched_to_idle,
.update_curr = update_curr_idle,
diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
index 4c9e9975684f..3e50a6a8f1e5 100644
--- a/kernel/sched/stop_task.c
+++ b/kernel/sched/stop_task.c
@@ -102,12 +102,6 @@ prio_changed_stop(struct rq *rq, struct task_struct *p, int oldprio)
BUG(); /* how!?, what priority? */
}
-static unsigned int
-get_rr_interval_stop(struct rq *rq, struct task_struct *task)
-{
- return 0;
-}
-
static void update_curr_stop(struct rq *rq)
{
}
@@ -136,8 +130,6 @@ const struct sched_class stop_sched_class = {
.task_tick = task_tick_stop,
- .get_rr_interval = get_rr_interval_stop,
-
.prio_changed = prio_changed_stop,
.switched_to = switched_to_stop,
.update_curr = update_curr_stop,
--
2.17.1
next prev parent reply other threads:[~2020-06-03 8:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 8:03 [PATCH 0/4] sched: Remove some redundancy Dietmar Eggemann
2020-06-03 8:03 ` [PATCH 1/4] sched/pelt: Remove redundant cap_scale() definition Dietmar Eggemann
2020-06-03 12:04 ` Vincent Guittot
2020-06-16 12:21 ` [tip: sched/core] " tip-bot2 for Dietmar Eggemann
2020-06-03 8:03 ` [PATCH 2/4] sched/core: Remove redundant 'preempt' param from sched_class->yield_to_task() Dietmar Eggemann
2020-06-16 12:21 ` [tip: sched/core] " tip-bot2 for Dietmar Eggemann
2020-06-03 8:03 ` Dietmar Eggemann [this message]
2020-06-16 12:21 ` [tip: sched/core] sched/idle,stop: Remove .get_rr_interval from sched_class tip-bot2 for Dietmar Eggemann
2020-06-03 8:03 ` [PATCH 4/4] sched/fair: Remove unused 'sd' parameter from scale_rt_capacity() Dietmar Eggemann
2020-06-03 12:06 ` Vincent Guittot
2020-06-16 12:21 ` [tip: sched/core] " tip-bot2 for Dietmar Eggemann
2020-06-03 11:53 ` [PATCH 0/4] sched: Remove some redundancy Peter Zijlstra
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=20200603080304.16548-4-dietmar.eggemann@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/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®