From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH v2 19/20] IB/rdmavt, IB/qib, IB/hfi1: Make percpu refcount optional for user MRs Date: Thu, 6 Apr 2017 11:44:38 -0600 Message-ID: <20170406174438.GA20020@obsidianresearch.com> References: <20170321002631.28538.2121.stgit@scvm10.sc.intel.com> <1491417489.2923.6.camel@redhat.com> <32E1700B9017364D9B60AED9960492BC342EA858@fmsmsx120.amr.corp.intel.com> <20170406074955.GG2269@mtr-leonro.local> <8cdf2fbb-f2a9-0b4b-b144-397ee73d1569@intel.com> <32E1700B9017364D9B60AED9960492BC342EABD0@fmsmsx120.amr.corp.intel.com> <20170406171354.GA19854@obsidianresearch.com> <32E1700B9017364D9B60AED9960492BC342EADEE@fmsmsx120.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <32E1700B9017364D9B60AED9960492BC342EADEE-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "Marciniszyn, Mike" Cc: "Dalessandro, Dennis" , Leon Romanovsky , Doug Ledford , linux-rdma List-Id: linux-rdma@vger.kernel.org On Thu, Apr 06, 2017 at 05:16:31PM +0000, Marciniszyn, Mike wrote: > > > There were two patches in the patch series, one reworks the rdmavt > > > read side MR to allow for getting rid of an explicit RCU at deref > > > time. The second module parameter was intended to allow for a faster > > > memory registration for user MRs as an option. > > > > If it is faster why wouldn't you always just use that mode? > > It would be faster mr deregistration, but slower data patch since > atomic operations would then be done. Umm.. This doesn't look like a refcount, it is a rwlock - why aren't you using the optimized percpu_rwsem? Seriously, making a rwlock out of a completion and a percpu_refcount and then providing user options to micro-optimize it is fantastically ugly/bad taste. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html