diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-01-30 12:08:14 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-01-30 12:08:14 -0500 |
commit | c78267e83e90c66730597848562ed63323be2970 (patch) | |
tree | cb22ded5e1c36f0802bcdc0e195fae9beb3b0cc5 | |
parent | eaa2e9aea0bbdd3d4594fb937ceacc81e30772b0 (diff) | |
download | rt-patches-c78267e83e90c66730597848562ed63323be2970.tar.gz |
refresh sched-Extend-activate_task-to-allow-queueing-to-the-.patch
code move from sched ---> sched_fair
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | sched-Extend-activate_task-to-allow-queueing-to-the-.patch | 57 |
1 files changed, 26 insertions, 31 deletions
diff --git a/sched-Extend-activate_task-to-allow-queueing-to-the-.patch b/sched-Extend-activate_task-to-allow-queueing-to-the-.patch index b09db23..082d7f7 100644 --- a/sched-Extend-activate_task-to-allow-queueing-to-the-.patch +++ b/sched-Extend-activate_task-to-allow-queueing-to-the-.patch @@ -1,4 +1,4 @@ -From 749dea12b52f9f2ebd6dfec274f180c5f5db5660 Mon Sep 17 00:00:00 2001 +From 993967ecc4b7685ee320b50fdc3d04267d9bd9a0 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 21 Feb 2010 19:23:36 +0100 Subject: [PATCH] sched: Extend activate_task to allow queueing to the head of a list @@ -11,22 +11,13 @@ list is required to fix some violations of POSIX scheduling policy. Extend activate_task with a "head" argument and fix up all callers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> diff --git a/kernel/sched.c b/kernel/sched.c -index 61d3280..a94db59 100644 +index 5c260f0..abb9f14 100644 --- a/kernel/sched.c +++ b/kernel/sched.c -@@ -1479,7 +1479,8 @@ static const u32 prio_to_wmult[40] = { - /* 15 */ 119304647, 148102320, 186737708, 238609294, 286331153, - }; - --static void activate_task(struct rq *rq, struct task_struct *p, int wakeup); -+static void activate_task(struct rq *rq, struct task_struct *p, int wakeup, -+ bool head); - - /* - * runqueue iterator, to support SMP load-balancing between different -@@ -2052,12 +2053,13 @@ static int effective_prio(struct task_struct *p) +@@ -1967,12 +1967,13 @@ static void dequeue_task(struct rq *rq, struct task_struct *p, int sleep) /* * activate_task - move a task to the runqueue. */ @@ -42,7 +33,7 @@ index 61d3280..a94db59 100644 inc_nr_running(rq); } -@@ -2554,7 +2556,7 @@ out_activate: +@@ -2524,7 +2525,7 @@ out_activate: schedstat_inc(p, se.nr_wakeups_local); else schedstat_inc(p, se.nr_wakeups_remote); @@ -51,7 +42,7 @@ index 61d3280..a94db59 100644 success = 1; /* -@@ -2821,7 +2823,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) +@@ -2791,7 +2792,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) BUG_ON(p->state != TASK_WAKING); p->state = TASK_RUNNING; update_rq_clock(rq); @@ -60,16 +51,7 @@ index 61d3280..a94db59 100644 trace_sched_wakeup_new(rq, p, 1); check_preempt_curr(rq, p, WF_FORK); #ifdef CONFIG_SMP -@@ -3390,7 +3392,7 @@ static void pull_task(struct rq *src_rq, struct task_struct *p, - { - deactivate_task(src_rq, p, 0); - set_task_cpu(p, this_cpu); -- activate_task(this_rq, p, 0); -+ activate_task(this_rq, p, 0, false); - check_preempt_curr(this_rq, p, 0); - } - -@@ -6699,7 +6701,7 @@ recheck: +@@ -4868,7 +4869,7 @@ recheck: if (running) p->sched_class->set_curr_task(rq); if (on_rq) { @@ -78,7 +60,7 @@ index 61d3280..a94db59 100644 check_class_changed(rq, p, prev_class, oldprio, running); } -@@ -7612,7 +7614,7 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu) +@@ -5781,7 +5782,7 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu) if (p->se.on_rq) { deactivate_task(rq_src, p, 0); set_task_cpu(p, dest_cpu); @@ -87,7 +69,7 @@ index 61d3280..a94db59 100644 check_preempt_curr(rq_dest, p, 0); } done: -@@ -7780,7 +7782,7 @@ void sched_idle_next(void) +@@ -5949,7 +5950,7 @@ void sched_idle_next(void) __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1); update_rq_clock(rq); @@ -96,7 +78,7 @@ index 61d3280..a94db59 100644 raw_spin_unlock_irqrestore(&rq->lock, flags); } -@@ -10134,7 +10136,7 @@ static void normalize_task(struct rq *rq, struct task_struct *p) +@@ -8251,7 +8252,7 @@ static void normalize_task(struct rq *rq, struct task_struct *p) deactivate_task(rq, p, 0); __setscheduler(rq, p, SCHED_NORMAL, 0); if (on_rq) { @@ -105,11 +87,24 @@ index 61d3280..a94db59 100644 resched_task(rq->curr); } } +diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c +index 4881995..4c47b93 100644 +--- a/kernel/sched_fair.c ++++ b/kernel/sched_fair.c +@@ -1828,7 +1828,7 @@ static void pull_task(struct rq *src_rq, struct task_struct *p, + { + deactivate_task(src_rq, p, 0); + set_task_cpu(p, this_cpu); +- activate_task(this_rq, p, 0); ++ activate_task(this_rq, p, 0, false); + check_preempt_curr(this_rq, p, 0); + } + diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c -index 2eea970..7a27ef6 100644 +index 365430c..216c101 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c -@@ -1418,7 +1418,7 @@ static int push_rt_task(struct rq *rq) +@@ -1424,7 +1424,7 @@ static int push_rt_task(struct rq *rq) deactivate_task(rq, next_task, 0); set_task_cpu(next_task, lowest_rq->cpu); @@ -118,7 +113,7 @@ index 2eea970..7a27ef6 100644 resched_task(lowest_rq->curr); -@@ -1501,7 +1501,7 @@ static int pull_rt_task(struct rq *this_rq) +@@ -1507,7 +1507,7 @@ static int pull_rt_task(struct rq *this_rq) deactivate_task(src_rq, p, 0); set_task_cpu(p, this_cpu); |