Commit 02d8ec94 authored by Ingo Molnar's avatar Ingo Molnar

sched/deadline, rt: Rename queue_push_tasks/queue_pull_task to create separate namespace

There are similarly named functions in both of these modules:

  kernel/sched/deadline.c:static inline void queue_push_tasks(struct rq *rq)
  kernel/sched/deadline.c:static inline void queue_pull_task(struct rq *rq)
  kernel/sched/deadline.c:static inline void queue_push_tasks(struct rq *rq)
  kernel/sched/deadline.c:static inline void queue_pull_task(struct rq *rq)
  kernel/sched/deadline.c:	queue_push_tasks(rq);
  kernel/sched/deadline.c:	queue_pull_task(rq);
  kernel/sched/deadline.c:			queue_push_tasks(rq);
  kernel/sched/deadline.c:			queue_pull_task(rq);
  kernel/sched/rt.c:static inline void queue_push_tasks(struct rq *rq)
  kernel/sched/rt.c:static inline void queue_pull_task(struct rq *rq)
  kernel/sched/rt.c:static inline void queue_push_tasks(struct rq *rq)
  kernel/sched/rt.c:	queue_push_tasks(rq);
  kernel/sched/rt.c:	queue_pull_task(rq);
  kernel/sched/rt.c:			queue_push_tasks(rq);
  kernel/sched/rt.c:			queue_pull_task(rq);

... which makes it harder to grep for them. Prefix them with
deadline_ and rt_, respectively.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent a92057e1
...@@ -511,7 +511,7 @@ static DEFINE_PER_CPU(struct callback_head, dl_pull_head); ...@@ -511,7 +511,7 @@ static DEFINE_PER_CPU(struct callback_head, dl_pull_head);
static void push_dl_tasks(struct rq *); static void push_dl_tasks(struct rq *);
static void pull_dl_task(struct rq *); static void pull_dl_task(struct rq *);
static inline void queue_push_tasks(struct rq *rq) static inline void deadline_queue_push_tasks(struct rq *rq)
{ {
if (!has_pushable_dl_tasks(rq)) if (!has_pushable_dl_tasks(rq))
return; return;
...@@ -519,7 +519,7 @@ static inline void queue_push_tasks(struct rq *rq) ...@@ -519,7 +519,7 @@ static inline void queue_push_tasks(struct rq *rq)
queue_balance_callback(rq, &per_cpu(dl_push_head, rq->cpu), push_dl_tasks); queue_balance_callback(rq, &per_cpu(dl_push_head, rq->cpu), push_dl_tasks);
} }
static inline void queue_pull_task(struct rq *rq) static inline void deadline_queue_pull_task(struct rq *rq)
{ {
queue_balance_callback(rq, &per_cpu(dl_pull_head, rq->cpu), pull_dl_task); queue_balance_callback(rq, &per_cpu(dl_pull_head, rq->cpu), pull_dl_task);
} }
...@@ -594,11 +594,11 @@ static inline void pull_dl_task(struct rq *rq) ...@@ -594,11 +594,11 @@ static inline void pull_dl_task(struct rq *rq)
{ {
} }
static inline void queue_push_tasks(struct rq *rq) static inline void deadline_queue_push_tasks(struct rq *rq)
{ {
} }
static inline void queue_pull_task(struct rq *rq) static inline void deadline_queue_pull_task(struct rq *rq)
{ {
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
...@@ -1759,7 +1759,7 @@ pick_next_task_dl(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) ...@@ -1759,7 +1759,7 @@ pick_next_task_dl(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
if (hrtick_enabled(rq)) if (hrtick_enabled(rq))
start_hrtick_dl(rq, p); start_hrtick_dl(rq, p);
queue_push_tasks(rq); deadline_queue_push_tasks(rq);
return p; return p;
} }
...@@ -2309,7 +2309,7 @@ static void switched_from_dl(struct rq *rq, struct task_struct *p) ...@@ -2309,7 +2309,7 @@ static void switched_from_dl(struct rq *rq, struct task_struct *p)
if (!task_on_rq_queued(p) || rq->dl.dl_nr_running) if (!task_on_rq_queued(p) || rq->dl.dl_nr_running)
return; return;
queue_pull_task(rq); deadline_queue_pull_task(rq);
} }
/* /*
...@@ -2331,7 +2331,7 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p) ...@@ -2331,7 +2331,7 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
if (rq->curr != p) { if (rq->curr != p) {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (p->nr_cpus_allowed > 1 && rq->dl.overloaded) if (p->nr_cpus_allowed > 1 && rq->dl.overloaded)
queue_push_tasks(rq); deadline_queue_push_tasks(rq);
#endif #endif
if (dl_task(rq->curr)) if (dl_task(rq->curr))
check_preempt_curr_dl(rq, p, 0); check_preempt_curr_dl(rq, p, 0);
...@@ -2356,7 +2356,7 @@ static void prio_changed_dl(struct rq *rq, struct task_struct *p, ...@@ -2356,7 +2356,7 @@ static void prio_changed_dl(struct rq *rq, struct task_struct *p,
* or lowering its prio, so... * or lowering its prio, so...
*/ */
if (!rq->dl.overloaded) if (!rq->dl.overloaded)
queue_pull_task(rq); deadline_queue_pull_task(rq);
/* /*
* If we now have a earlier deadline task than p, * If we now have a earlier deadline task than p,
......
...@@ -355,7 +355,7 @@ static DEFINE_PER_CPU(struct callback_head, rt_pull_head); ...@@ -355,7 +355,7 @@ static DEFINE_PER_CPU(struct callback_head, rt_pull_head);
static void push_rt_tasks(struct rq *); static void push_rt_tasks(struct rq *);
static void pull_rt_task(struct rq *); static void pull_rt_task(struct rq *);
static inline void queue_push_tasks(struct rq *rq) static inline void rt_queue_push_tasks(struct rq *rq)
{ {
if (!has_pushable_tasks(rq)) if (!has_pushable_tasks(rq))
return; return;
...@@ -363,7 +363,7 @@ static inline void queue_push_tasks(struct rq *rq) ...@@ -363,7 +363,7 @@ static inline void queue_push_tasks(struct rq *rq)
queue_balance_callback(rq, &per_cpu(rt_push_head, rq->cpu), push_rt_tasks); queue_balance_callback(rq, &per_cpu(rt_push_head, rq->cpu), push_rt_tasks);
} }
static inline void queue_pull_task(struct rq *rq) static inline void rt_queue_pull_task(struct rq *rq)
{ {
queue_balance_callback(rq, &per_cpu(rt_pull_head, rq->cpu), pull_rt_task); queue_balance_callback(rq, &per_cpu(rt_pull_head, rq->cpu), pull_rt_task);
} }
...@@ -421,7 +421,7 @@ static inline void pull_rt_task(struct rq *this_rq) ...@@ -421,7 +421,7 @@ static inline void pull_rt_task(struct rq *this_rq)
{ {
} }
static inline void queue_push_tasks(struct rq *rq) static inline void rt_queue_push_tasks(struct rq *rq)
{ {
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
...@@ -1565,7 +1565,7 @@ pick_next_task_rt(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) ...@@ -1565,7 +1565,7 @@ pick_next_task_rt(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
/* The running task is never eligible for pushing */ /* The running task is never eligible for pushing */
dequeue_pushable_task(rq, p); dequeue_pushable_task(rq, p);
queue_push_tasks(rq); rt_queue_push_tasks(rq);
return p; return p;
} }
...@@ -2185,7 +2185,7 @@ static void switched_from_rt(struct rq *rq, struct task_struct *p) ...@@ -2185,7 +2185,7 @@ static void switched_from_rt(struct rq *rq, struct task_struct *p)
if (!task_on_rq_queued(p) || rq->rt.rt_nr_running) if (!task_on_rq_queued(p) || rq->rt.rt_nr_running)
return; return;
queue_pull_task(rq); rt_queue_pull_task(rq);
} }
void __init init_sched_rt_class(void) void __init init_sched_rt_class(void)
...@@ -2216,7 +2216,7 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p) ...@@ -2216,7 +2216,7 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p)
if (task_on_rq_queued(p) && rq->curr != p) { if (task_on_rq_queued(p) && rq->curr != p) {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (p->nr_cpus_allowed > 1 && rq->rt.overloaded) if (p->nr_cpus_allowed > 1 && rq->rt.overloaded)
queue_push_tasks(rq); rt_queue_push_tasks(rq);
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
if (p->prio < rq->curr->prio && cpu_online(cpu_of(rq))) if (p->prio < rq->curr->prio && cpu_online(cpu_of(rq)))
resched_curr(rq); resched_curr(rq);
...@@ -2240,7 +2240,7 @@ prio_changed_rt(struct rq *rq, struct task_struct *p, int oldprio) ...@@ -2240,7 +2240,7 @@ prio_changed_rt(struct rq *rq, struct task_struct *p, int oldprio)
* may need to pull tasks to this runqueue. * may need to pull tasks to this runqueue.
*/ */
if (oldprio < p->prio) if (oldprio < p->prio)
queue_pull_task(rq); rt_queue_pull_task(rq);
/* /*
* If there's a higher priority task waiting to run * If there's a higher priority task waiting to run
......
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