From owner-freebsd-smp@FreeBSD.ORG Mon Jun 8 21:04:28 2009 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E192106564A; Mon, 8 Jun 2009 21:04:28 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f217.google.com (mail-bw0-f217.google.com [209.85.218.217]) by mx1.freebsd.org (Postfix) with ESMTP id 5DE248FC19; Mon, 8 Jun 2009 21:04:27 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by bwz17 with SMTP id 17so611181bwz.43 for ; Mon, 08 Jun 2009 14:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=2l5AbUYISz6IpnY+xCu6wGTQz/vS/2l20wv5ANejyHA=; b=tJg9FO3h9UCD6cICOp8Lwc2tFGXRWT9kZEkQCw6HH60aPHk+d3PDCr7rczHkqrRZtS c/mklGNWksdD/z3Xge0GXZWBK+Z4qta3rLciiHtstVCfIzhgS5MyVaGFbrS16YmaZhsM +RgcHUB4mjRzkYq6nozzk3O2a0ZSCzF9DjPqw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=iTBRIk2d1SfH2aG12Q/O7SppOad0LhaP3AcOSbgsE5QsBjxzj27C1aAF4KKfBRuNph rXFf071dm0/qPoMdsk0RPH03WpZtlyEfguae86nfv17WgufvM/tCs3wk57VVUB99rT9j 1MHMCMU1OrjPt388rVkObR4kT6Xjd7uyxNQmc= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.112.204 with SMTP id x12mr4735147fap.70.1244493755848; Mon, 08 Jun 2009 13:42:35 -0700 (PDT) Date: Mon, 8 Jun 2009 22:42:35 +0200 X-Google-Sender-Auth: 4ad939ca14ef331c Message-ID: <3bbf2fe10906081342i6ef418e0n75e22d0b9e2543b3@mail.gmail.com> From: Attilio Rao To: freebsd-arch@freebsd.org, freebsd-smp@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: [PATCH] Adaptive spinning for lockmgr X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 21:04:28 -0000 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. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein