Date: Wed, 03 Apr 2002 15:29:04 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Terry Lambert <tlambert2@mindspring.com> Cc: Jake Burkholder <jake@locore.ca>, smp@FreeBSD.ORG, "Andrew R. Reiter" <arr@FreeBSD.ORG> Subject: Re: Where to initialize certain locks... Message-ID: <XFMail.20020403152904.jhb@FreeBSD.org> In-Reply-To: <3CAB621A.6F84F736@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03-Apr-2002 Terry Lambert wrote: > John Baldwin wrote: >> We need mutexes prior to mi_startup(). > > There are really two problems with this theory: > > 1) You can't use them before the mutex system is initialized, > which happens from mi_startup. Incorrect. It happens prior to mi_startup(). > 2) There are no contended resources until after mi_startup > starts the other CPU(s). But there is lots of code that we don't want to have to do stuff like: if (!cold) mtx_lock(&foo_mtx); else /* just wing it */ Easier to just always acquire the locks and init them early enough. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020403152904.jhb>