From owner-freebsd-smp Tue May 28 14:33:28 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by hub.freebsd.org (Postfix) with ESMTP id BEF0237B440 for ; Tue, 28 May 2002 14:32:47 -0700 (PDT) Received: (qmail 29579 invoked from network); 28 May 2002 21:32:46 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 28 May 2002 21:32:46 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g4SLWxF25081; Tue, 28 May 2002 17:32:59 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020528205206.GI17045@elvis.mu.org> Date: Tue, 28 May 2002 17:32:26 -0400 (EDT) From: John Baldwin To: Alfred Perlstein Subject: Re: socket buffers and condition variables Cc: tanimura@r.dl.itc.u-tokyo.ac.jp, smp@freebsd.org, Jeffrey Hsu Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 28-May-2002 Alfred Perlstein wrote: > * John Baldwin [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 <>< 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