From owner-freebsd-current@FreeBSD.ORG Thu Aug 29 15:37:49 2013 Return-Path: Delivered-To: freebsd-current@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 ESMTP id 1EF9C5B3 for ; Thu, 29 Aug 2013 15:37:49 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm14-vm0.bullet.mail.bf1.yahoo.com (nm14-vm0.bullet.mail.bf1.yahoo.com [98.139.213.164]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADE1C2187 for ; Thu, 29 Aug 2013 15:37:48 +0000 (UTC) Received: from [98.139.212.146] by nm14.bullet.mail.bf1.yahoo.com with NNFMP; 29 Aug 2013 15:37:41 -0000 Received: from [68.142.230.65] by tm3.bullet.mail.bf1.yahoo.com with NNFMP; 29 Aug 2013 15:37:41 -0000 Received: from [127.0.0.1] by smtp222.mail.bf1.yahoo.com with NNFMP; 29 Aug 2013 15:37:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1377790661; bh=sl2eof/Mq54DsMSXno1xhR4rB+OMdYDBqJioaWzAoJI=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=5nx67tQjcxswQuOUZtvuFUTji4snWQ8vKGCobZlla/wKprKSIXZucgcseXPtxw6IpAT6pQdUWVTpCmaiFJqjohx6D8nFFQ0clvx/oOs+r6HUcChmq9T9CyOeK6bdgi2fXa+m2ugPgy1f7o0yjY8MzjAH5tkjeRbtylxe8MPPGwA= X-Yahoo-Newman-Id: 508687.6034.bm@smtp222.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: zMjjfIIVM1nwUud_OaWyyfNc2uwkmn1U3bga6WLmaJ886ZJ mFcyxKf9A9K0uip.cX9.5LCYtBMK5PHk9981MniK5ueCwZbK1wEN5wCpq1AE fHMGpfdjuivwPcXX0ANpgauuue5rmEIXGs18M_tGKYsLHbB8F1QqqBrzGmQw O5U1DeIiLa1MBHsykyPzYvSGyLfxkS5W1eISdAjSlNLjJuRuDcA5a.9nGPs3 FAOFM.pb3k9ZB8UNPM5dSwgfGjyIHITfzEskSwnYPizsHmti7AzP25ahwg0t 95Qw_wiZuI4qPtKBJR3JcGR_7lVaswort6W4marwsh4L0zr9TtPIK1YlONP7 cZqwJh69eW48s1zb_Gpqld7waQPTk03qScPcSSrPIabrxiDY.rAkGnqJXER. Fl_MCNfVAe3MAAF89BwLW9G2Ak97mrnGzJq8oT1NTM_DTu_VHgClWPyTUqh2 c3rZfNXwUVn62rhmEN4b6cFkyc_CPB1xJlbWhBIIkRaJq5t6uywMx7hsV5dV bUmiw0X9kA3actusX5mAADFTRcN6ytJU- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- X-Rocket-Received: from [172.16.7.246] (scott4long@173.13.138.133 with ) by smtp222.mail.bf1.yahoo.com with SMTP; 29 Aug 2013 15:37:41 +0000 UTC Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: [rfc] migrate lagg to an rmlock From: Scott Long In-Reply-To: <201308291042.13282.jhb@freebsd.org> Date: Thu, 29 Aug 2013 08:37:08 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <41614148-3900-4FE0-88AC-40F10DAE2030@yahoo.com> References: <5218AA36.1080807@ipfw.ru> <201308291042.13282.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1508) X-Mailman-Approved-At: Thu, 29 Aug 2013 19:09:09 +0000 Cc: FreeBSD Net , Adrian Chadd , freebsd-current@freebsd.org, Robert Watson , "Alexander V. Chernikov" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 15:37:49 -0000 On Aug 29, 2013, at 7:42 AM, John Baldwin wrote: > On Saturday, August 24, 2013 10:16:33 am Robert Watson wrote: >> There are a number of other places in the kernel where migration to = an rmlock=20 >> makes sense -- however, some care must be taken for four reasons: (1) = while=20 >> read locks don't experience line contention, write locking becomes = observably=20 >> e.g., rmlocks might not be suitable for tcbinfo; (2) rmlocks, unlike = rwlocks,=20 >> more expensive so is not suitable for all rwlock line contention = spots --=20 >> implement reader priority propagation, so you must reason about; and = (3)=20 >> historically, rmlocks have not fully implemented WITNESS so you may = get less=20 >> good debugging output. if_lagg is a nice place to use rmlocks, as=20 >> reconfigurations are very rare, and it's really all about long-term = data=20 >> stability. >=20 > 3) should no longer be an issue. rmlocks now have full WITNESS and = assertion > support (including an rm_assert). >=20 > However, one thing to consider is that rmlocks pin readers to CPUs = while the > read lock is held (which rwlocks do not do). And this is not a problem for the application that we're giving it in = the lagg driver. Scott