On 05.01 Hugh Dickins wrote:
> On Tue, 1 May 2001, J . A . Magallon wrote:
> > >
> > > OK works here ...
> >
> > Me too.
> >
> > Perhaps this reschedules ok in UP but kinda fails in SMP...
>
> Great. And see Andrea's SCHED_YIELD explanation in the "sluggish"
> mail thread. Well, I didn't try to understand it in full, and I
> think he was expecting another thread to hang, rather than the main
> startup itself; but no doubt deeper thought would make sense of it all.
>
I saw it. Minimal change to make 2.4.4-ac2 work:
========== patch-fork-yield
--- linux/kernel/fork.c.orig Tue May 1 20:03:12 2001
+++ linux/kernel/fork.c Tue May 1 20:52:18 2001
@@ -677,8 +677,11 @@
* few simple things and then exec(). This is only important in the
* first timeslice. In the long run, the scheduling behavior is
* unchanged.
+ * Make sure the child gets the SCHED_YIELD flag cleared, even if
+ * it inherited it, to avoid deadlocks.
*/
p->counter = (current->counter + 1) >> 1;
+ p->policy &= ~SCHED_YIELD;
current->counter >>= 1;
current->policy |= SCHED_YIELD;
current->need_resched = 1;
Is this enough (Andrea?) or just "works for me" ?.
--
J.A. Magallon # Let the source
mailto:[EMAIL PROTECTED] # be with you, Luke...
Linux werewolf 2.4.4-ac1 #1 SMP Tue May 1 11:35:17 CEST 2001 i686
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/