linux-2.6-npiggin/kernel/fork.c | 7 +------ linux-2.6-npiggin/kernel/sched.c | 20 ++------------------ 2 files changed, 3 insertions(+), 24 deletions(-) diff -puN kernel/sched.c~no-child-run-first kernel/sched.c --- linux-2.6/kernel/sched.c~no-child-run-first 2004-05-23 18:22:41.000000000 +1000 +++ linux-2.6-npiggin/kernel/sched.c 2004-05-23 18:22:41.000000000 +1000 @@ -1073,15 +1073,7 @@ void fastcall wake_up_forked_process(tas p->prio = effective_prio(p); set_task_cpu(p, smp_processor_id()); - if (unlikely(!current->array)) - __activate_task(p, rq); - else { - p->prio = current->prio; - list_add_tail(&p->run_list, ¤t->run_list); - p->array = current->array; - p->array->nr_active++; - rq->nr_running++; - } + __activate_task(p, rq); task_rq_unlock(rq, &flags); } @@ -1395,15 +1387,7 @@ lock_again: set_task_cpu(p, cpu); if (cpu == this_cpu) { - if (unlikely(!current->array)) - __activate_task(p, rq); - else { - p->prio = current->prio; - list_add_tail(&p->run_list, ¤t->run_list); - p->array = current->array; - p->array->nr_active++; - rq->nr_running++; - } + __activate_task(p, rq); } else { schedstat_inc(sd, sbc_pushed); /* Not the local CPU - must adjust timestamp */ diff -puN kernel/fork.c~no-child-run-first kernel/fork.c --- linux-2.6/kernel/fork.c~no-child-run-first 2004-05-23 18:22:41.000000000 +1000 +++ linux-2.6-npiggin/kernel/fork.c 2004-05-23 18:22:41.000000000 +1000 @@ -1239,12 +1239,7 @@ long do_fork(unsigned long clone_flags, wait_for_completion(&vfork); if (unlikely (current->ptrace & PT_TRACE_VFORK_DONE)) ptrace_notify ((PTRACE_EVENT_VFORK_DONE << 8) | SIGTRAP); - } else - /* - * Let the child process run first, to avoid most of the - * COW overhead when the child exec()s afterwards. - */ - set_need_resched(); + } } return pid; } _