From owner-svn-src-all@FreeBSD.ORG Sat Jul 19 18:32:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23D7D791; Sat, 19 Jul 2014 18:32:32 +0000 (UTC) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [IPv6:2a00:1450:4010:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF4EA229F; Sat, 19 Jul 2014 18:32:30 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id el20so3663623lab.41 for ; Sat, 19 Jul 2014 11:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=/P8bDR/C8vDQkyKo5b8FgBE0ZxPQEL+Mn2H85N/mg/A=; b=V/7cW/aijadiijpphLvLlw6yLbrndJFheqzjukXhwbV7mzYklOzZBGr+NrpTaVpQ6K PTwqSmLRjIa9TQ9EI2QjBOcekuAqhVRl7rbtkgn/6bdaSUt8B2JuZvEUZuu+NgQnMDF/ xvKGze6wl+F/kRhtWfCHiVGbN+brpeDe3vPj75qd9fFwxWhj9a6uanZ+rQNVFs4zN2po fNSZAKkTIVLfGqgfcDfhzwn3GuT2aSXJwcaKtA55ieGEpa5mvqXd4bM3AF6scGHBpg6m 8WGZ9LYwxOZPYP2eSTmMR1EGIaq3RDKEbBUsYkoA4CBYN9sk4FGIIZLghtAqJhsQdwsl krxA== X-Received: by 10.152.5.105 with SMTP id r9mr13570231lar.37.1405794748460; Sat, 19 Jul 2014 11:32:28 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([91.198.175.1]) by mx.google.com with ESMTPSA id qv5sm15697162lbb.19.2014.07.19.11.32.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 19 Jul 2014 11:32:27 -0700 (PDT) Sender: Alexander Motin Message-ID: <53CAB9B9.6010504@FreeBSD.org> Date: Sat, 19 Jul 2014 21:32:25 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Robert Watson , Xin LI Subject: Re: svn commit: r268852 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys References: <201407181809.s6II9KkB002810@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-vendor@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2014 18:32:32 -0000 On 19.07.2014 13:42, Robert Watson wrote: > On Fri, 18 Jul 2014, Xin LI wrote: > >> Log: >> 5008 lock contention (rrw_exit) while running a read only load >> Reviewed by: Matthew Ahrens >> Reviewed by: George Wilson >> Reviewed by: Alex Reece >> Reviewed by: Christopher Siden >> Reviewed by: Richard Yao >> Reviewed by: Saso Kiselkov >> Approved by: Garrett D'Amore >> >> illumos/illumos-gate@c9030f6c93613fe30ee0c16f92b96da7816ac052 > > Is there an opportunity to use our own read-mostly lock implementation > here? It should be substantially more scalable, has integration with > WITNESS, proper priority propagation, etc. Our rmlock(4) tells: "Writers are permitted to sleep while holding a read-mostly lock, but readers are not." That is not acceptable for ZFS, which allocates memory in many places. Also the rrw locks used there have specific recursion semantics: readers are allowed to recurse on the lock even when there is waiting writer. But first read acquisition at the same situation is not allowed. I am not sure whether out rmlocks can do the same. -- Alexander Motin