Date: Sat, 27 Jan 2001 22:14:25 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Bosko Milekic <bmilekic@FreeBSD.org> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: RE: cvs commit: src/sys/i386/i386 mp_machdep.c Message-ID: <XFMail.010127221425.jhb@FreeBSD.org> In-Reply-To: <200101280341.f0S3f1s35766@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <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.010127221425.jhb>