Re: 2.6.7-mm6

From: Ingo Molnar
Date: Wed Jul 07 2004 - 02:35:07 EST



* David S. Miller <davem@xxxxxxxxxx> wrote:

> On Tue, 6 Jul 2004 16:36:18 -0700
> William Lee Irwin III <wli@xxxxxxxxxxxxxx> wrote:
>
> > I have it isolated down to the sched-clean-init-idle.patch and
> > sched-clean-fork.patch. sched-clean-init-idle.patch fails to build without
> > the second of those two applied, so I didn't do any work to narrow it down
> > further.
>
> One thing to note is that we don't currently call the
> wake_up_forked_process() thing in our SMP idle bootup
> dispatcher in arch/sparc64/kernel/smp.c

the patch below should solve this. Is it safe on sparc to do a
fork_by_hand() like this?

Ingo

--- linux/arch/sparc64/kernel/smp.c.orig
+++ linux/arch/sparc64/kernel/smp.c
@@ -293,6 +293,16 @@ extern unsigned long sparc64_cpu_startup
*/
static struct thread_info *cpu_new_thread = NULL;

+static struct task_struct * __init fork_by_hand(void)
+{
+ struct pt_regs regs;
+ /*
+ * don't care about the regs settings since
+ * we'll never reschedule the forked task.
+ */
+ return copy_process(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
+}
+
static int __devinit smp_boot_one_cpu(unsigned int cpu)
{
unsigned long entry =
@@ -302,9 +312,7 @@ static int __devinit smp_boot_one_cpu(un
struct task_struct *p;
int timeout, ret, cpu_node;

- kernel_thread(NULL, NULL, CLONE_IDLETASK);
-
- p = prev_task(&init_task);
+ p = fork_by_hand();

init_idle(p, cpu);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/