Date: Tue, 4 Jul 2000 08:38:22 +0930 From: Greg Lehey <grog@lemis.com> To: "Jeroen C. van Gelderen" <jeroen@vangelderen.org> Cc: Daniel Eischen <eischen@vigrid.com>, Jason Evans <jasone@canonware.com>, Luoqi Chen <luoqi@watermarkgroup.com>, smp@FreeBSD.ORG Subject: Re: SMP meeting summary Message-ID: <20000704083822.A65029@wantadilla.lemis.com> In-Reply-To: <3960A971.982DDF07@vangelderen.org> References: <20000703114535.T39024@wantadilla.lemis.com> <Pine.SUN.3.91.1000703060948.5216A-100000@pcnet1.pcnet.com> <20000703200039.H62680@wantadilla.lemis.com> <3960A971.982DDF07@vangelderen.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 3 July 2000 at 10:55:45 -0400, Jeroen C. van Gelderen wrote: > Greg Lehey wrote: > [...] >> That's an assumption. So far we have *never* had a thundering herd, >> because the code don't work yet. > > Your position is an assumption too. The difference is that > one usually doesn't optimize until one has profiling > information available. Am I correct in assuming that you > haven't done any profiling yet? Am I correct in assuming > that wake_one is an optimization? You're not correct in your implied assumption that we can see any potential problems with wake_one. >>> then waking everyone is an optimization since you only have to take >>> the scheduling lock once. >> >> No. If I understand things correctly, each process would need to get >> the schedlock, and only one process can get the mutex. Why wake the >> rest? What do you want them to do? > > If -on average- there is only one process waiting you don't > want to go trough the trouble of implementing a more complex > wake_one. It would only complicate the code with negligible > gain. There's nothing to say that wake_one is more complex. wake_one takes the first process on the mutex's sleep list and wakes it. wake_all (or whatever) would make a loop out of that wake function and wake all the processes on the list. All would then be scheduled, try to take the mutex, and all except one would fail and be put back on the sleep list. Does this make sense? > That's my reading of Sun's claims in Solaris and given that they > have a little more experience with this kind of thing I'm inclined > to believe them until I see facts stating the contrary. Sun's problem with Solaris is non-obvious, and may not bite us. I think we should hold off with this kind of discussion for the while. Everything I can see suggests that it's crazy to wake all processes. If we find that we run into race conditions which we can only solve with wake_all, though, we'll compare the effort in fixing them with the (undoubted) performance degradation caused by waking them all. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers 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?20000704083822.A65029>