Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2002 18:29:07 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Jeffrey Hsu <hsu@FreeBSD.org>
Cc:        smp@freebsd.org, tanimura@r.dl.itc.u-tokyo.ac.jp, Alfred Perlstein <bright@mu.org>
Subject:   Re: socket buffers and condition variables
Message-ID:  <XFMail.20020528182907.jhb@FreeBSD.org>
In-Reply-To: <0GWU003BXDPGNP@mta7.pltn13.pbi.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On 28-May-2002 Jeffrey Hsu wrote:
>   > well, that won't be a valid assumption for bug so long anyways as
>   > cv's wont' have their own queue forever but will probably share their
>   > queue's with tsleep in the future.  It's an implementation detail.
> 
> John is right.  This is the way Solaris implements condition variables,
> for example.
> 
>   > I don't care if you use cv's instead of sleep/wakeup since cv's are
>   > often used with mutexes
> 
> I do.  I think we should stick w/ sleep/wakeup unless there's a good reason
> to change the code.  There are places where condition variables are the
> better choice, by design and not by implementation detail, but this isn't one
> of them.

Well, with wakeup_one() our sleep/wakeup really are just duplicating the
functionality of cv's.  At some point we should deprecate one in favor of
the other but we can worry about that later on I think.

>   > reduced contention isn't really a valid reason to use them.
> 
> Since this task is
>   A. questionable
>   B. not needed to lock up the networking stack
> can we remove it from the SMP todo roadmap?  We can always do it later
> if it does turn out to be a good idea.

Yes, I would put it off until later on for now.

-- 

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.20020528182907.jhb>