Commit 0900acf2 authored by Dietmar Eggemann's avatar Dietmar Eggemann Committed by Peter Zijlstra

sched/core: Remove redundant 'preempt' param from sched_class->yield_to_task()

Commit 6d1cafd8 ("sched: Resched proper CPU on yield_to()") moved
the code to resched the CPU from yield_to_task_fair() to yield_to()
making the preempt parameter in sched_class->yield_to_task()
unnecessary. Remove it. No other sched_class implements yield_to_task().
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-3-dietmar.eggemann@arm.com
parent 844eb645
...@@ -5810,7 +5810,7 @@ int __sched yield_to(struct task_struct *p, bool preempt) ...@@ -5810,7 +5810,7 @@ int __sched yield_to(struct task_struct *p, bool preempt)
if (task_running(p_rq, p) || p->state) if (task_running(p_rq, p) || p->state)
goto out_unlock; goto out_unlock;
yielded = curr->sched_class->yield_to_task(rq, p, preempt); yielded = curr->sched_class->yield_to_task(rq, p);
if (yielded) { if (yielded) {
schedstat_inc(rq->yld_count); schedstat_inc(rq->yld_count);
/* /*
......
...@@ -7157,7 +7157,7 @@ static void yield_task_fair(struct rq *rq) ...@@ -7157,7 +7157,7 @@ static void yield_task_fair(struct rq *rq)
set_skip_buddy(se); set_skip_buddy(se);
} }
static bool yield_to_task_fair(struct rq *rq, struct task_struct *p, bool preempt) static bool yield_to_task_fair(struct rq *rq, struct task_struct *p)
{ {
struct sched_entity *se = &p->se; struct sched_entity *se = &p->se;
......
...@@ -1748,7 +1748,7 @@ struct sched_class { ...@@ -1748,7 +1748,7 @@ struct sched_class {
void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags);
void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags);
void (*yield_task) (struct rq *rq); void (*yield_task) (struct rq *rq);
bool (*yield_to_task)(struct rq *rq, struct task_struct *p, bool preempt); bool (*yield_to_task)(struct rq *rq, struct task_struct *p);
void (*check_preempt_curr)(struct rq *rq, struct task_struct *p, int flags); void (*check_preempt_curr)(struct rq *rq, struct task_struct *p, int flags);
......
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