summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNick Piggin <nickpiggin@yahoo.com.au>2004-08-23 21:08:17 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-23 21:08:17 -0700
commitc15d3bea6f1d48d6f4e23afcfa3282144b948207 (patch)
tree01ab7c7e718b04511bf1d6bad865715460445c14 /kernel
parentb4f14b649f7c28041795cb728b71bab2fcf8cbef (diff)
[PATCH] sched: remove balance on clone
This removes balance on clone capability altogether. I told Andi we wouldn't remove it yet, but provided it is in a single small patch, he mightn't get too upset. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c2
-rw-r--r--kernel/sched.c24
2 files changed, 3 insertions, 23 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index bf522f2f33ca..2ac003c78a72 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1030,7 +1030,7 @@ struct task_struct *copy_process(unsigned long clone_flags,
p->pdeath_signal = 0;
/* Perform scheduler related setup */
- sched_fork(p, clone_flags);
+ sched_fork(p);
/*
* Ok, make it visible to the rest of the system.
diff --git a/kernel/sched.c b/kernel/sched.c
index 21d777561e71..139a5da891b1 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -874,30 +874,10 @@ static int find_idlest_cpu(struct task_struct *p, int this_cpu,
* Perform scheduler related setup for a newly forked process p.
* p is forked by current. The cpu hotplug lock is held.
*/
-void fastcall sched_fork(task_t *p, unsigned long clone_flags)
+void fastcall sched_fork(task_t *p)
{
- int cpu;
-#ifdef CONFIG_SMP
- struct sched_domain *tmp, *sd = NULL;
- preempt_disable();
- cpu = smp_processor_id();
+ int cpu = smp_processor_id();
- if ((clone_flags & (CLONE_VM|CLONE_VFORK)) == CLONE_VM) {
- /*
- * New thread that is not a vfork.
- * Find the largest domain that this CPU is part of that
- * is willing to balance on clone:
- */
- for_each_domain(cpu, tmp)
- if (tmp->flags & SD_BALANCE_CLONE)
- sd = tmp;
- if (sd)
- cpu = find_idlest_cpu(p, cpu, sd);
- }
- preempt_enable();
-#else
- cpu = smp_processor_id();
-#endif
/*
* The task hasn't been attached yet, so cpus_allowed mask cannot
* change. The cpus_allowed mask of the parent may have changed