From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 25 20:34:57 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A974A16A417 for ; Sun, 25 Nov 2007 20:34:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6DAC313C459 for ; Sun, 25 Nov 2007 20:34:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 548D4471B0; Sun, 25 Nov 2007 15:38:16 -0500 (EST) Date: Sun, 25 Nov 2007 20:34:42 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Christopher Chen In-Reply-To: <7bc80d500711251209p3bd78bc0leb37d4cb85f677f3@mail.gmail.com> Message-ID: <20071125203321.G65286@fledge.watson.org> References: <474830F9.90305@zirakzigil.org> <6eb82e0711240638g2cc1e54o1fb1321cafe8ff9f@mail.gmail.com> <1188.202.127.99.4.1195957922.squirrel@webmail.triplegate.net.id> <20071125110116.U63238@fledge.watson.org> <7bc80d500711251205w1a74b649mc3bd374545c1012c@mail.gmail.com> <7bc80d500711251209p3bd78bc0leb37d4cb85f677f3@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Before & After Under The Giant Lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2007 20:34:57 -0000 On Sun, 25 Nov 2007, Christopher Chen wrote: > On Nov 25, 2007 12:05 PM, Christopher Chen wrote: >> On Nov 25, 2007 3:13 AM, Robert Watson wrote: >>> At this point, Giant is gradually becoming a lock around the tty, newbus, >>> usb, and msdosfs code, and we're largely at diminishing returns in terms >>> of making improvements in parallelism through removing Giant. In FreeBSD >>> 7, the focus was on improving parallelism rather than removing Giant, with >>> improvements in locking primitives, the scheduler, and lock granularity. >>> For example, most of the improvement in MySQL performance in FreeBSD 7 can >>> be put down to a small number of changes: >>> >>> - Conversion to 1:1 threads from M:N threads. >> >> I enjoyed reading your overview of changes from FreeBSD 6 to 7 with regards >> to MP scalability, but I am a bit confused over this point--Doesn't the >> user still have the choice between libthread, which is M:N, and libthr, >> which is 1:1? >> >> At some point during the 6.x days, it was considered advantageous to use >> libthr when running MySQL. Has the project decided to go with libthread >> after all? >> >> Perhaps we're talking about entirely different things. > > My apologies. I re-read your statement and it makes sense now. > > I thought you were saying we were converting from 1:1 to M:N. > > Sorry for any confusion! No problem -- just to be clear: in 7, users can still choose between libpthread (m:n) and libthr (1:1), but the default is now libthr rather than libpthread, as libthr seemed to perform better in most if not all workloads of interest. The libthr in 7.0 is an enhanced version of the libthr that was present in 6.x, although I don't have a list of the changes off-hand. Robert N M Watson Computer Laboratory University of Cambridge