[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-d7c33c4930f569caf6b2ece597432853c4151a45@git.kernel.org>
Date: Wed, 16 Sep 2009 10:21:30 GMT
From: tip-bot for Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
a.p.zijlstra@...llo.nl, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:sched/core] sched: Fix task affinity for select_task_rq_fair
Commit-ID: d7c33c4930f569caf6b2ece597432853c4151a45
Gitweb: http://git.kernel.org/tip/d7c33c4930f569caf6b2ece597432853c4151a45
Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
AuthorDate: Fri, 11 Sep 2009 12:45:38 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 15 Sep 2009 16:01:07 +0200
sched: Fix task affinity for select_task_rq_fair
While merging select_task_rq_fair() and sched_balance_self() I made
a mistake that leads to testing the wrong task affinty.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/sched_fair.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 43dc6d1..8b3eddb 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1318,7 +1318,6 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
*/
static int select_task_rq_fair(struct task_struct *p, int flag, int sync)
{
- struct task_struct *t = current;
struct sched_domain *tmp, *sd = NULL;
int cpu = smp_processor_id();
int prev_cpu = task_cpu(p);
@@ -1393,13 +1392,13 @@ static int select_task_rq_fair(struct task_struct *p, int flag, int sync)
continue;
}
- group = find_idlest_group(sd, t, cpu);
+ group = find_idlest_group(sd, p, cpu);
if (!group) {
sd = sd->child;
continue;
}
- new_cpu = find_idlest_cpu(group, t, cpu);
+ new_cpu = find_idlest_cpu(group, p, cpu);
if (new_cpu == -1 || new_cpu == cpu) {
/* Now try balancing at a lower domain level of cpu */
sd = sd->child;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists