Skip to content

Commit

Permalink
sched/core: Remove ttwu_activate()
Browse files Browse the repository at this point in the history
After the removal of try_to_wake_up_local(), there is only one user of
ttwu_activate() left, and since it is a trivial function, remove it.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 16, 2019
1 parent 6d25be5 commit 1b174a2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1681,12 +1681,6 @@ ttwu_stat(struct task_struct *p, int cpu, int wake_flags)
__schedstat_inc(p->se.statistics.nr_wakeups_sync);
}

static inline void ttwu_activate(struct rq *rq, struct task_struct *p, int en_flags)
{
activate_task(rq, p, en_flags);
p->on_rq = TASK_ON_RQ_QUEUED;
}

/*
* Mark the task runnable and perform wakeup-preemption.
*/
Expand Down Expand Up @@ -1738,7 +1732,8 @@ ttwu_do_activate(struct rq *rq, struct task_struct *p, int wake_flags,
en_flags |= ENQUEUE_MIGRATED;
#endif

ttwu_activate(rq, p, en_flags);
activate_task(rq, p, en_flags);
p->on_rq = TASK_ON_RQ_QUEUED;
ttwu_do_wakeup(rq, p, wake_flags, rf);
}

Expand Down

0 comments on commit 1b174a2

Please sign in to comment.