From owner-cvs-all Sat Jan 27 22:14:55 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 7B6B037B400; Sat, 27 Jan 2001 22:14:32 -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 f0S6EXc00864; Sat, 27 Jan 2001 22:14:33 -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: <200101280341.f0S3f1s35766@freefall.freebsd.org> Date: Sat, 27 Jan 2001 22:14:25 -0800 (PST) From: John Baldwin To: Bosko Milekic Subject: RE: cvs commit: src/sys/i386/i386 mp_machdep.c Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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: --- kern_idle.c 2000/10/20 07:58:03 1.11 +++ kern_idle.c 2001/01/27 23:53:15 @@ -63,6 +63,8 @@ gd->gd_idleproc->p_flag |= P_NOLOAD; gd->gd_idleproc->p_stat = SRUN; + if (gd->gd_curproc == NULL) + gd->gd_curproc = gd->gd_idleproc; } } The check for NULL is so that we don't change curproc on the boot processor. -- 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