Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jan 2001 22:19:10 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Jason Evans <jasone@canonware.com>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Bosko Milekic <bmilekic@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/i386/i386 mp_machdep.c
Message-ID:  <XFMail.010128221910.jhb@FreeBSD.org>
In-Reply-To: <20010127222552.S87569@canonware.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 28-Jan-01 Jason Evans wrote:
> On Sat, Jan 27, 2001 at 10:14:25PM -0800, John Baldwin wrote:
>> 
>> On 28-Jan-01 Bosko Milekic wrote:
>> > bmilekic    2001/01/27 19:41:01 PST
>> > 
>> >   Modified files:
>> >     sys/i386/i386        mp_machdep.c 
>> >   Log:
>> >   Move the setting of curproc to idleproc up earlier in ap_init(). The
>> >   problem is that a mutex lock, prior to this change, is acquired before
>> >   the curproc is set to idleproc, so we mess ourselves up by calling
>> >   the mutex lock routine with curproc == NULL.
>> >   
>> >   Moving it up after the aps_ready spin-wait has us hopefully setting it
>> >   after idleproc is setup.
>> >   
>> >   Solved by: jake (the allmighty) :-)
>> 
>> Forgotten by:   jasone
>> 
>> Actually, what I suggested to jasone (and kind of preferred myself) was to
>> set
>> each curproc in the AP's when we initialized the idleprocs.  This has the
>> benefit of being MI:
> 
> Actually, I didn't forget it; the machine wouldn't boot with that change in
> place, so I took it back out.

Did you do the check for NULL sot that you didn't change curproc on the boot
processor?  If not you probably hung trying to release/recurse on Giant. 
Without this or Bosko's version of the fix, the AP's have a NULL curproc when
they try to grab the ap_boot_lock and bad things can happen.

> Jason

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010128221910.jhb>