From owner-freebsd-arch@FreeBSD.ORG Sun Jun 14 13:01:44 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D4211065689; Sun, 14 Jun 2009 13:01:44 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from kennaway-macbookpro.config (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C842B8FC0A; Sun, 14 Jun 2009 13:01:43 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <4A34F4B7.5050904@FreeBSD.org> Date: Sun, 14 Jun 2009 14:01:43 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Attilio Rao References: <3bbf2fe10906081342i6ef418e0n75e22d0b9e2543b3@mail.gmail.com> In-Reply-To: <3bbf2fe10906081342i6ef418e0n75e22d0b9e2543b3@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-smp@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [PATCH] Adaptive spinning for lockmgr X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 13:01:45 -0000 Attilio Rao wrote: > This patch enables adaptive spinning for lockmgr: > http://www.freebsd.org/~attilio/adaptive_lockmgr.diff > > and it should presumably improve performance on disks/vfs/buffer cache > based benchmarks, so, if you want to try out and report any benchmarks > result, I'd love to see it. > Please note that there are some parameters to tune: for example, you > would like to not enable adaptive spinning to default while you just > want that for a class of locks (and in that case you want to apply the > reversed logic for what is living now) or you want to use different > values for retries and loops. Interested developers can refer to such > 3 variables. > Peter Holm alredy tested that patch for about 24hours without any > regression to report. > > Also note that the patch is not 100% yet as long as it needs UPDATES > and manpages updates, but they will be added just in time before to > commit. > The modify is all there. I have a vague memory that we had tested a version of this in the past and found that it caused a performance loss in common cases? Many lockmgr callers are not amenable to adaptive spinning because they have to wait on slow I/O. Testing only with e.g. md backing might give results that are non-representative. Kris