Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2002 17:32:26 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Alfred Perlstein <bright@mu.org>
Cc:        tanimura@r.dl.itc.u-tokyo.ac.jp, smp@freebsd.org, Jeffrey Hsu <hsu@FreeBSD.org>
Subject:   Re: socket buffers and condition variables
Message-ID:  <XFMail.20020528173226.jhb@FreeBSD.org>
In-Reply-To: <20020528205206.GI17045@elvis.mu.org>

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

On 28-May-2002 Alfred Perlstein wrote:
> * John Baldwin <jhb@FreeBSD.org> [020528 13:21] wrote:
>> 
>> On 28-May-2002 Jeffrey Hsu wrote:
>> >   > Reduce contention upon locking a socket buffer by replacing tsleep() and
>> >   > wakeup() with a condvar.
>> > 
>> > I'd prefer if we waited until we had the networking stack all locked up
>> > before measuring and deciding that there is enough contention on socket
>> > buffers to warrant this change.
>> 
>> I don't really see how this change avoids contention anyways.
> 
> The stuff we talked about... using the mutex associated with the
> condvar rather than the schedlock to protect the cv's wait queue.
> Basically reduce contention on the global wait queues and schedlock.

Hmm, 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.
I don't care if you use cv's instead of sleep/wakeup since cv's are
often used with mutexes, but reduced contention isn't really a valid
reason to use them.

-- 

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