public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "J . A . Magallon" <jamagallon@able.es>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: boris <boris@macbeth.rhoen.de>, Hugh Dickins <hugh@veritas.com>
Subject: [PATCH] Re: Linux 2.4.4-ac2
Date: Tue, 1 May 2001 20:55:10 +0200	[thread overview]
Message-ID: <20010501205510.A1059@werewolf.able.es> (raw)
In-Reply-To: <20010501192726.A1246@werewolf.able.es> <Pine.LNX.4.21.0105011835240.1576-100000@localhost.localdomain>
In-Reply-To: <Pine.LNX.4.21.0105011835240.1576-100000@localhost.localdomain>; from hugh@veritas.com on Tue, May 01, 2001 at 19:41:43 +0200


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:jamagallon@able.es                              #  be with you, Luke... 

Linux werewolf 2.4.4-ac1 #1 SMP Tue May 1 11:35:17 CEST 2001 i686


  parent reply	other threads:[~2001-05-01 18:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-01 10:50 Linux 2.4.4-ac2 Alan Cox
2001-05-01 15:06 ` J . A . Magallon
2001-05-01 15:50   ` Hugh Dickins
2001-05-01 16:07     ` J . A . Magallon
2001-05-01 17:12     ` boris
2001-05-01 17:27       ` J . A . Magallon
     [not found]         ` <Pine.LNX.4.21.0105011835240.1576-100000@localhost.localdomain>
2001-05-01 18:55           ` J . A . Magallon [this message]
2001-05-01 19:09             ` [PATCH] " Mark Hahn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010501205510.A1059@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=boris@macbeth.rhoen.de \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox