From owner-cvs-all Sun Jan 28 22:20: 4 2001 Delivered-To: cvs-all@freebsd.org Received: from moby.geekhouse.net (moby.geekhouse.net [64.81.6.36]) by hub.freebsd.org (Postfix) with ESMTP id 8703737B400; Sun, 28 Jan 2001 22:19:36 -0800 (PST) Received: from laptop.baldwin.cx (john@dhcp150.geekhouse.net [192.168.1.150]) by moby.geekhouse.net (8.11.0/8.9.3) with ESMTP id f0T6JPc03412; Sun, 28 Jan 2001 22:19:37 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010127222552.S87569@canonware.com> Date: Sun, 28 Jan 2001 22:19:10 -0800 (PST) From: John Baldwin To: Jason Evans Subject: Re: cvs commit: src/sys/i386/i386 mp_machdep.c Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Bosko Milekic Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 -- 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