atom feed65 messages in org.freebsd.freebsd-smpRe: SMP meeting summary
FromSent OnAttachments
Jason EvansJun 24, 2000 11:56 pm 
Daniel EischenJun 25, 2000 6:58 am 
Terry LambertJun 25, 2000 10:12 am 
Terry LambertJun 25, 2000 10:36 am 
Julian ElischerJun 25, 2000 10:41 am 
Poul-Henning KampJun 25, 2000 11:07 am 
Nate WilliamsJun 25, 2000 9:41 pm 
Frank MayharJun 25, 2000 11:27 pm 
Frank MayharJun 25, 2000 11:31 pm 
Luoqi ChenJun 26, 2000 9:46 am 
Arun SharmaJun 26, 2000 9:47 am 
Jason EvansJun 26, 2000 11:06 am 
Matthew DillonJun 26, 2000 12:26 pm 
Matthew DillonJun 26, 2000 12:48 pm 
John SconiersJun 26, 2000 12:56 pm 
Matthew DillonJun 26, 2000 1:07 pm 
Luoqi ChenJun 26, 2000 1:13 pm 
Doug RabsonJun 26, 2000 1:26 pm 
Jason EvansJun 26, 2000 2:56 pm 
Jason EvansJun 26, 2000 3:14 pm 
Daniel EischenJun 26, 2000 4:59 pm 
Luoqi ChenJun 26, 2000 7:14 pm 
Jason EvansJun 26, 2000 7:55 pm 
Joe EykholtJun 26, 2000 8:09 pm 
Greg LeheyJun 27, 2000 8:00 pm 
Jason EvansJun 27, 2000 8:25 pm 
Daniel EischenJun 27, 2000 8:26 pm 
Greg LeheyJun 27, 2000 9:59 pm 
Greg LeheyJun 27, 2000 10:11 pm 
Terry LambertJun 28, 2000 4:15 pm 
Terry LambertJun 28, 2000 4:18 pm 
Terry LambertJun 28, 2000 4:37 pm 
Terry LambertJun 28, 2000 4:51 pm 
Arun SharmaJun 28, 2000 9:43 pm 
Greg LeheyJul 2, 2000 7:15 pm 
Daniel EischenJul 3, 2000 3:23 am 
Greg LeheyJul 3, 2000 3:30 am 
Jeroen C. van GelderenJul 3, 2000 7:55 am 
Chuck PatersonJul 3, 2000 8:28 am 
Chuck PatersonJul 3, 2000 8:47 am 
Frank MayharJul 3, 2000 8:49 am 
Greg LeheyJul 3, 2000 4:08 pm 
David ScheidtJul 3, 2000 4:35 pm 
Joe EykholtJul 3, 2000 4:47 pm 
Greg LeheyJul 3, 2000 4:52 pm 
Joe EykholtJul 3, 2000 4:58 pm 
Greg LeheyJul 3, 2000 5:26 pm 
Joe EykholtJul 3, 2000 5:41 pm 
Chuck PatersonJul 3, 2000 7:17 pm 
Daniel EischenJul 3, 2000 7:25 pm 
Daniel EischenJul 3, 2000 7:35 pm 
Greg LeheyJul 3, 2000 7:39 pm 
Daniel EischenJul 3, 2000 7:41 pm 
Chuck PatersonJul 3, 2000 8:40 pm 
Alfred PerlsteinJul 3, 2000 10:08 pm 
Greg LeheyJul 3, 2000 10:37 pm 
Peter WemmJul 4, 2000 2:43 pm 
Greg LeheyJul 4, 2000 3:58 pm 
Peter WemmJul 4, 2000 4:06 pm 
Terry LambertJul 5, 2000 3:38 pm 
Terry LambertJul 5, 2000 4:00 pm 
Terry LambertJul 5, 2000 4:06 pm 
Terry LambertJul 5, 2000 4:10 pm 
Alfred PerlsteinJul 5, 2000 4:29 pm 
Terry LambertJul 6, 2000 4:50 pm 
Subject:Re: SMP meeting summary
From:Daniel Eischen (eisc@vigrid.com)
Date:Jul 3, 2000 7:41:05 pm
List:org.freebsd.freebsd-smp

On Tue, 4 Jul 2000, Greg Lehey wrote:

On Monday, 3 July 2000 at 9:28:34 -0600, Chuck Paterson wrote:

Well if you are considering spinning for a bit of time on a held mutex (which you seem to advocate?), then why not wake everyone? If mutexes are held for very short periods of time and you don't often have a thundering herd problem, then waking everyone is an optimization since you only have to take the scheduling lock once. If mutexes can be held for long periods of time, then you probably wouldn't want to wake everyone.

Dan Eischen

If all processes are made runnable at once then both future releases and acquisitions of the mutex may be uncontested, resulting in not having to acquire the scheduling lock.

I'm not sure we're talking about the same thing, but if so I must be missing something. If I'm waiting on a mutex, I still need to reacquire it on wakeup, don't I? In that case, only the first process to be scheduled will actually get the mutex, and the others will block again.

If the system is busy and there are not idle CPUs then there won't be a thundering herd, because there is no herd to thunder.

So we get a creeping herd? If we wake more processes than we can handle, we're just going to spend time putting the rest to sleep again.

The probability of threads blocking on the mutex before it is released is a function of mutex hold time to the time it takes a processor to calling switch with the thread which wants to run being the highest priority. In general mutex hold time is small compared to the time a process runs.

Fine, but there are exceptions. Obviously if we only ever have one thread waiting on the mutex, we don't have any basis for discussion.

<snip>

In general there ought not to be multiple processes piling up on a mutex. If there are and for some reason they can't be fixed then these particular mutexs are going to dictate how this area is handled. Once we have these cases in hand we can make some decisions as to how to proceed.

In my experience, I've seen mutexes used for long-term waits, and I don't see any a priori reason not to do so. Of course, if we make design decisions based on the assumption that all waits will be short, then we will have a reason, but it won't be a good one.

Before you say that long-term waits are evil, note that we're probably talking about different kinds of waits. Obviously anything that threatens to keep the system idle while it waits is bad, but a replacement for tsleep(), say, can justifiably wait for a long time.

Which is why we want condition variables to replace tsleep(). If you want to wait long periods of time, then use condition variables or reader/writer locks. Mutex and condition variables can be used in a very similar way to splXXX() and tsleep().

To Unsubscribe: send mail to majo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message