Commit e3e76a6a authored by Dietmar Eggemann's avatar Dietmar Eggemann Committed by Peter Zijlstra

sched/idle,stop: Remove .get_rr_interval from sched_class

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 a57beec5
("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: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200603080304.16548-4-dietmar.eggemann@arm.com
parent 0900acf2
...@@ -446,11 +446,6 @@ prio_changed_idle(struct rq *rq, struct task_struct *p, int oldprio) ...@@ -446,11 +446,6 @@ prio_changed_idle(struct rq *rq, struct task_struct *p, int oldprio)
BUG(); 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) static void update_curr_idle(struct rq *rq)
{ {
} }
...@@ -479,8 +474,6 @@ const struct sched_class idle_sched_class = { ...@@ -479,8 +474,6 @@ const struct sched_class idle_sched_class = {
.task_tick = task_tick_idle, .task_tick = task_tick_idle,
.get_rr_interval = get_rr_interval_idle,
.prio_changed = prio_changed_idle, .prio_changed = prio_changed_idle,
.switched_to = switched_to_idle, .switched_to = switched_to_idle,
.update_curr = update_curr_idle, .update_curr = update_curr_idle,
......
...@@ -102,12 +102,6 @@ prio_changed_stop(struct rq *rq, struct task_struct *p, int oldprio) ...@@ -102,12 +102,6 @@ prio_changed_stop(struct rq *rq, struct task_struct *p, int oldprio)
BUG(); /* how!?, what priority? */ 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) static void update_curr_stop(struct rq *rq)
{ {
} }
...@@ -136,8 +130,6 @@ const struct sched_class stop_sched_class = { ...@@ -136,8 +130,6 @@ const struct sched_class stop_sched_class = {
.task_tick = task_tick_stop, .task_tick = task_tick_stop,
.get_rr_interval = get_rr_interval_stop,
.prio_changed = prio_changed_stop, .prio_changed = prio_changed_stop,
.switched_to = switched_to_stop, .switched_to = switched_to_stop,
.update_curr = update_curr_stop, .update_curr = update_curr_stop,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment