From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH V3 1/5] RDMA/core: Transport-independent access flags Date: Wed, 15 Jul 2015 13:12:57 -0600 Message-ID: <20150715191257.GF23588@obsidianresearch.com> References: <559FC710.1050307@talpey.com> <20150710161108.GA19042@obsidianresearch.com> <55A24571.60902@dev.mellanox.co.il> <00e201d0be6a$e49bc910$add35b30$@opengridcomputing.com> <20150714192941.GA26292@obsidianresearch.com> <00e401d0be6b$d3952750$7abf75f0$@opengridcomputing.com> <20150714195511.GB7716@infradead.org> <20150714202943.GB26927@obsidianresearch.com> <20150715065057.GA22113@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20150715065057.GA22113-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: 'Christoph Hellwig' Cc: Steve Wise , 'Sagi Grimberg' , 'Steve Wise' , 'Tom Talpey' , 'Doug Ledford' , sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org, bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org, 'Oren Duer' List-Id: linux-rdma@vger.kernel.org On Tue, Jul 14, 2015 at 11:50:57PM -0700, 'Christoph Hellwig' wrote: > On Tue, Jul 14, 2015 at 02:29:43PM -0600, Jason Gunthorpe wrote: > > local_dma_lkey appears to be global, it works with any PD. > > > > ib_get_dma_mr is tied to a PD, so it cannot replace local_dma_lkey at > > the struct device level. > > > > ib_alloc_pd is the in-kernel entry point, the UAPI calls > > device->alloc_pd directly.. So how about the below patch as a starting > > point? > > This looks perfect to me. After this we can get rid of the > ib_get_dma_mr calls outside of ib_alloc_pd, and eventuall move > setting up ->local_dma_lkey into the HW driver and kill of > ib_get_dma_mr, IB_DEVICE_LOCAL_DMA_LKEY and device->local_dma_lkey. Just for clarity, again, we can never do this. device->local_dma_lkey requires dedicated hardware support. We cannot create it in software on old hardware. The only option I see is the different-for-every-PD solution in my patch. > (especially together with patches removing all other callsites of > "ib_get_dma_mr(pd, IB_ACCESS_LOCAL_WRITE)". I might find time to type this in, but I won't be able to find time to do any testing on the ULPs.. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html