linux-mips
[Top] [All Lists]

Re: init_idle reaped before final call

To: Kip Walker <kwalker@broadcom.com>
Subject: Re: init_idle reaped before final call
From: Justin Carlson <justincarlson@cmu.edu>
Date: 05 Mar 2002 18:33:08 -0500
Cc: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>, linux-kernel@vger.kernel.org, linux-mips@oss.sgi.com
In-reply-to: <3C854399.2BE48DF2@broadcom.com>
References: <3C8522EA.2A00E880@broadcom.com> <292270000.1015365429@flay> <3C854399.2BE48DF2@broadcom.com>
Sender: owner-linux-mips@oss.sgi.com
On Tue, 2002-03-05 at 17:15, Kip Walker wrote:
> 
> Maybe a better fix is to avoid this double calling of init_idle for the
> "master" CPU?  From my reading the code, x86 seems to behave the same.
> 

Looks to me like the clean fix would be to call init_idle() from
rest_init() before the init() thread is spawned, and remove it from
cpu_idle().  It looks like a pretty straightforward race condition that
no one else has happened to trigger in a bad way.  I'm no scheduler pro,
but I don't see any problems with calling init_idle() earlier.

That fix assumes that bringup of non-primary cpus on other architectures
call init_idle() explicitly before allowing smp_init() to return; this
is true of mips, but I can't vouch for any other arch's.

I'd submit a patch, but I'm sadly lacking in SMP machines for testing. 
Anyone who wants to rectify that, I'm open to charity.  :)

-Justin

Attachment: signature.asc
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>