Re: [RFC PATCH 2/4] uverbs: Add common ib_iomem_get service

2010-07-29 Thread Tom Tucker
On 7/29/10 1:22 PM, Ralph Campbell wrote: On Thu, 2010-07-29 at 09:25 -0700, Tom Tucker wrote: From: Tom Tuckert...@opengridcomputing.com Add an ib_iomem_get service that converts a vma to an array of physical addresses. This makes it easier for each device driver to add support for the

Re: [RFC PATCH 2/4] uverbs: Add common ib_iomem_get service

2010-07-29 Thread Ralph Campbell
I forgot to ask how pages are marked as being locked. I see that the user process amount of locked memory is adjusted but the actual pages themselves aren't converted to struct page and the refcount incremented. Presumably, the device which created the vma-vm_flags VM_PFNMAP mapping owns the

Re: [RFC PATCH 2/4] uverbs: Add common ib_iomem_get service

2010-07-29 Thread Jason Gunthorpe
On Thu, Jul 29, 2010 at 03:29:37PM -0500, Tom Tucker wrote: Also, I'd like to see a strong defence of this new user space API particularly: 1) Why can't this be done with the existing ibv_reg_mr, like huge pages are. The ibv_reg_mr API assumes that the memory being registered was

Re: [RFC PATCH 2/4] uverbs: Add common ib_iomem_get service

2010-07-29 Thread Tom Tucker
On 7/29/10 3:41 PM, Jason Gunthorpe wrote: On Thu, Jul 29, 2010 at 03:29:37PM -0500, Tom Tucker wrote: Also, I'd like to see a strong defence of this new user space API particularly: 1) Why can't this be done with the existing ibv_reg_mr, like huge pages are. The

Re: [RFC PATCH 2/4] uverbs: Add common ib_iomem_get service

2010-07-29 Thread Tom Tucker
On 7/29/10 11:25 AM, Tom Tucker wrote: From: Tom Tuckert...@opengridcomputing.com Add an ib_iomem_get service that converts a vma to an array of physical addresses. This makes it easier for each device driver to add support for the reg_io_mr provider method. Signed-off-by: Tom

Re: [Suspected SPAM] Re: [RFC PATCH 2/4] uverbs: Add common ib_iomem_get service

2010-07-29 Thread Ralph Campbell
On Thu, 2010-07-29 at 13:41 -0700, Jason Gunthorpe wrote: On Thu, Jul 29, 2010 at 03:29:37PM -0500, Tom Tucker wrote: Also, I'd like to see a strong defence of this new user space API particularly: 1) Why can't this be done with the existing ibv_reg_mr, like huge pages are.

Re: [Suspected SPAM] Re: [RFC PATCH 2/4] uverbs: Add common ib_iomem_get service

2010-07-29 Thread Jason Gunthorpe
You would need to modify ib_umem_get() to check for the VM_PFNMAP flag and build the struct ib_umem similar to the proposed ib_iomem_get(). However, the page reference counting/sharing issue would need to be solved. I think there are kernel level callbacks for this that could be used. But in

Re: [Suspected SPAM] Re: [RFC PATCH 2/4] uverbs: Add common ib_iomem_get service

2010-07-29 Thread Ralph Campbell
On Thu, 2010-07-29 at 15:57 -0700, Jason Gunthorpe wrote: You would need to modify ib_umem_get() to check for the VM_PFNMAP flag and build the struct ib_umem similar to the proposed ib_iomem_get(). However, the page reference counting/sharing issue would need to be solved. I think there

Re: [Suspected SPAM] Re: [RFC PATCH 2/4] uverbs: Add common ib_iomem_get service

2010-07-29 Thread Tom Tucker
On 7/29/10 5:57 PM, Jason Gunthorpe wrote: You would need to modify ib_umem_get() to check for the VM_PFNMAP flag and build the struct ib_umem similar to the proposed ib_iomem_get(). However, the page reference counting/sharing issue would need to be solved. I think there are kernel level