Re: [PATCH] xprtrdma: take vendor driver refcount at client

2015-07-28 Thread Sagi Grimberg
On 7/28/2015 2:01 AM, Devesh Sharma wrote: Thanks Chuck Lever for the valuable feedback and suggestions. This is a rework of the following patch sent almost a year back: http://www.mail-archive.com/linux-rdma%40vger.kernel.org/msg20730.html In presence of active mount if someone tries to rmmod

Re: Bug: Discover more than 1 iSER gives -- isert: isert_handle_wc: wr... status {9,1} vend_err {8a,d7) -- & -- conn error (1011)

2015-07-28 Thread Sagi Grimberg
On 7/28/2015 5:25 AM, james harvey wrote: Two up to date arch systems. Kernel 4.1.2 (Arch -2). 2 Mellanox MT25418 [ConnectX VPI PCIe 2.0 2.5GT/s - IB DDR / 10GigE] (rev a0) running mlx4_core driver v2.2-1 (Feb, 2014.) Both on most recent firmware for PSID MT_04A0110002, FW Version 2.9.1000. S

Re: [PATCH V6 6/9] isert: Rename IO functions to more descriptive names

2015-07-26 Thread Sagi Grimberg
Ideally, the post contains a chain of all 4 registrations and the rdma_read (and an opportunistic good scsi response). Just to be clear: This example is for IB only, correct? IW would require rkeys with REMOTE_WRITE and 4 read wrs. My assumption is that it would depend on max_sge_rd. IB on

Re: [PATCH V6 6/9] isert: Rename IO functions to more descriptive names

2015-07-26 Thread Sagi Grimberg
On 7/26/2015 6:53 PM, Christoph Hellwig wrote: On Sun, Jul 26, 2015 at 02:00:51PM +0300, Sagi Grimberg wrote: On the wire iser sends a single rkey, but the target is allowed to transfer the data however it wants to. So you're trying to get above the limit of a single RDMA READ, not abov

Re: [PATCH] mlx5: Expose correct page_size_cap in device attributes

2015-07-26 Thread Sagi Grimberg
On 7/24/2015 12:48 AM, Jason Gunthorpe wrote: On Thu, Jul 23, 2015 at 05:41:38PM -0400, Doug Ledford wrote: I assume this prevents the driver from working at all on certain arches (like ppc with 64k page size)? Nothing uses page_size_cap correctly, so it has no impact. Sagi, that is a good p

Re: [PATCH V6 6/9] isert: Rename IO functions to more descriptive names

2015-07-26 Thread Sagi Grimberg
On 7/26/2015 1:43 PM, Christoph Hellwig wrote: On Sun, Jul 26, 2015 at 01:08:16PM +0300, Sagi Grimberg wrote: I've given this some thought and I think we should avoid splitting logic from PI and iWARP. The reason (other than code duplication) is that currently the iser target support only

Re: [PATCH V6 9/9] isert: Support iWARP transports using FRMRs

2015-07-26 Thread Sagi Grimberg
On 7/24/2015 10:24 PM, Jason Gunthorpe wrote: On Fri, Jul 24, 2015 at 01:48:09PM -0500, Steve Wise wrote: The use of FRWR for RDMA READ should be iWarp specific, IB shouldn't pay that overhead. I am expecting to see a cap_rdma_read_rkey or something in here ? Ok. But cap_rdma_read_rkey() does

Re: [PATCH V6 6/9] isert: Rename IO functions to more descriptive names

2015-07-26 Thread Sagi Grimberg
On 7/24/2015 7:18 PM, Steve Wise wrote: This is in preparation for adding new FRMR-only IO handlers for devices that support FRMR and not PI. Steve, I've given this some thought and I think we should avoid splitting logic from PI and iWARP. The reason (other than code duplication) is that curr

Re: [PATCH V6 4/9] svcrdma: Use max_sge_rd for destination read depths

2015-07-26 Thread Sagi Grimberg
@@ -1059,6 +1062,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id-> route.addr.dst_addr)->sin_port), newxprt->sc_max_sge, + newxprt->sc_max_sge_rd,

Re: [PATCH V6 1/9] RDMA/iser: Limit sg tablesize and max_sectors to device fastreg max depth

2015-07-26 Thread Sagi Grimberg
On 7/24/2015 9:40 PM, Steve Wise wrote: -Original Message- From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] Sent: Friday, July 24, 2015 11:41 AM To: Steve Wise Cc: dledf...@redhat.com; infinip...@intel.com; sa...@mellanox.com; ogerl...@mellanox.com; r...@mellanox.com; li

Re: [PATCH V6 1/9] RDMA/iser: Limit sg tablesize and max_sectors to device fastreg max depth

2015-07-26 Thread Sagi Grimberg
On 7/24/2015 10:14 PM, Jason Gunthorpe wrote: On Fri, Jul 24, 2015 at 01:40:17PM -0500, Steve Wise wrote: Huh. How does this relate to the max_page_list_len argument: struct ib_mr *ib_alloc_fast_reg_mr(struct ib_pd *pd, int max_page_list_len) Shouldn't max_fast_reg_page_list_len be checked d

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-07-26 Thread Sagi Grimberg
On 7/23/2015 9:51 PM, Jason Gunthorpe wrote: On Thu, Jul 23, 2015 at 07:47:14PM +0300, Sagi Grimberg wrote: So we force ULPs to think about what they are doing properly, and we get a chance to actually force lkey to be local use only for IB. The lkey/rkey decision is passed in the fastreg

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-07-26 Thread Sagi Grimberg
On 7/23/2015 8:55 PM, Jason Gunthorpe wrote: On Thu, Jul 23, 2015 at 01:15:16PM +0300, Sagi Grimberg wrote: I was hoping we'd move the DMA flush and translate into here and make it mandatory. Is there any reason not to do that? The reason I didn't added it in was so the ULPs can

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-07-26 Thread Sagi Grimberg
I would like to see the kdoc for ib_map_mr_sg explain exactly what is required of the caller, maybe just hoist this bit from the ib_sg_to_pages I'll add the kdoc. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH WIP 01/43] IB: Modify ib_create_mr API

2015-07-26 Thread Sagi Grimberg
On 7/23/2015 10:08 PM, Jason Gunthorpe wrote: On Thu, Jul 23, 2015 at 01:07:56PM +0300, Sagi Grimberg wrote: On 7/22/2015 10:05 PM, Jason Gunthorpe wrote: The reason I named max_entries is because might might not be pages but real SG elements. It stands for maximum registration entries. Do you

Re: [PATCH 00/10] IB: Replace safe uses for ib_get_dma_mr with pd->local_dma_lkey

2015-07-26 Thread Sagi Grimberg
If we want security by default then I propose not only to change the default value of register_always from false into true but also to change the default value of prefer_fr from false into true such that fast registration becomes the default instead of FMR. Yes, I was frowning at that stuff to

Re: [PATCH WIP 38/43] iser-target: Port to new memory registration API

2015-07-23 Thread Sagi Grimberg
On 7/23/2015 7:31 PM, Jason Gunthorpe wrote: On Thu, Jul 23, 2015 at 01:27:23PM +0300, Sagi Grimberg wrote: ib_post_fastreg_wr would be a function that needs 3 register passed arguments and does a simple copy to the driver's actual sendq That will require to take the SQ lock and wr

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-07-23 Thread Sagi Grimberg
On 7/23/2015 7:14 PM, Jason Gunthorpe wrote: On Thu, Jul 23, 2015 at 01:19:16PM +0300, Sagi Grimberg wrote: Again, related to my prior comments, please have two of these: ib_map_mr_sg_rkey() ib_map_mr_sg_lkey() So we force ULPs to think about what they are doing properly, and we get a chance

Re: [PATCH 00/10] IB: Replace safe uses for ib_get_dma_mr with pd->local_dma_lkey

2015-07-23 Thread Sagi Grimberg
Sagi, IB/iser should have special attention paid, as it is less clear to me if it got everything. It looks fine. I'll pull those as well. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http:

Re: [PATCH 09/10] ib_srpt: Remove ib_get_dma_mr calls

2015-07-23 Thread Sagi Grimberg
On 7/23/2015 2:34 AM, Jason Gunthorpe wrote: The pd now has a local_dma_lkey member which completely replaces ib_get_dma_mr, use it instead. Signed-off-by: Jason Gunthorpe Looks good. Reviewed-by: Sagi Grimberg -- To unsubscribe from this list: send the line "unsubscribe linux-rdma&qu

Re: [PATCH 07/10] iser-target: Remove ib_get_dma_mr calls

2015-07-23 Thread Sagi Grimberg
On 7/23/2015 2:34 AM, Jason Gunthorpe wrote: The pd now has a local_dma_lkey member which completely replaces ib_get_dma_mr, use it instead. Signed-off-by: Jason Gunthorpe Looks good. Reviewed-by: Sagi Grimberg -- To unsubscribe from this list: send the line "unsubscribe linux-rdma&qu

Re: [PATCH 08/10] IB/srp: Use pd->local_dma_lkey

2015-07-23 Thread Sagi Grimberg
ood. Reviewed-by: Sagi Grimberg -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 06/10] IB/iser: Use pd->local_dma_lkey

2015-07-23 Thread Sagi Grimberg
tch. Signed-off-by: Jason Gunthorpe Looks good. Reviewed-by: Sagi Grimberg -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 01/10] IB/core: Guarantee that a local_dma_lkey is available

2015-07-23 Thread Sagi Grimberg
MR associated with the new PD. Signed-off-by: Jason Gunthorpe Reviewed-by: Sagi Grimberg Acked-by: Christoph Hellwig --- drivers/infiniband/core/verbs.c | 40 +++- include/rdma/ib_verbs.h | 2 ++ 2 files changed, 37 insertions(+), 5 deletions

Re: [PATCH WIP 37/43] xprtrdma: Port to new memory registration API

2015-07-23 Thread Sagi Grimberg
On 7/22/2015 7:04 PM, Chuck Lever wrote: On Jul 22, 2015, at 11:41 AM, Sagi Grimberg wrote: + for (i = 0; i < nsegs;) { + sg_set_page(&frmr->sg[i], seg->mr_page, + seg->mr_len, offset_in_page(seg->mr_offset)); Cautiona

Re: [PATCH WIP 00/43] New fast registration API

2015-07-23 Thread Sagi Grimberg
On 7/23/2015 12:28 PM, Christoph Hellwig wrote: On Wed, Jul 22, 2015 at 08:42:32PM +0300, Sagi Grimberg wrote: We can do that, but I'd prefer not to pollute the API just for this single use case. What we can do, is add a pool API that would take care of that. But even then we might end up

Re: [PATCH WIP 40/43] mlx5: Allocate private context for arbitrary scatterlist registration

2015-07-23 Thread Sagi Grimberg
On 7/23/2015 12:25 PM, Christoph Hellwig wrote: On Wed, Jul 22, 2015 at 11:30:48AM -0600, Jason Gunthorpe wrote: On Wed, Jul 22, 2015 at 09:55:40AM +0300, Sagi Grimberg wrote: + size += max_t(int, MLX5_UMR_ALIGN - ARCH_KMALLOC_MINALIGN, 0); + mr->klms = kzalloc(size, GFP_KER

Re: [PATCH WIP 38/43] iser-target: Port to new memory registration API

2015-07-23 Thread Sagi Grimberg
On 7/22/2015 8:57 PM, Jason Gunthorpe wrote: On Wed, Jul 22, 2015 at 08:33:16PM +0300, Sagi Grimberg wrote: memset(&fr_wr, 0, sizeof(fr_wr)); + ib_set_fastreg_wr(mr, mr->lkey, ISER_FASTREG_LI_WRID, + false, &fr_wr); Shouldn't ib_set_fast

Re: [PATCH WIP 37/43] xprtrdma: Port to new memory registration API

2015-07-23 Thread Sagi Grimberg
On 7/22/2015 10:21 PM, Steve Wise wrote: On 7/22/2015 1:55 AM, Sagi Grimberg wrote: Signed-off-by: Sagi Grimberg --- net/sunrpc/xprtrdma/frwr_ops.c | 80 ++--- net/sunrpc/xprtrdma/xprt_rdma.h | 4 ++- 2 files changed, 47 insertions(+), 37 deletions

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-07-23 Thread Sagi Grimberg
On 7/22/2015 9:02 PM, Jason Gunthorpe wrote: On Wed, Jul 22, 2015 at 09:55:28AM +0300, Sagi Grimberg wrote: +/** + * ib_map_mr_sg() - Populates MR with a dma mapped SG list + * @mr:memory region + * @sg:dma mapped scatterlist + * @sg_nents: number of entries in sg

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-07-23 Thread Sagi Grimberg
On 7/22/2015 8:44 PM, Jason Gunthorpe wrote: On Wed, Jul 22, 2015 at 09:50:12AM -0700, Christoph Hellwig wrote: +/** + * ib_map_mr_sg() - Populates MR with a dma mapped SG list + * @mr:memory region + * @sg:dma mapped scatterlist + * @sg_nents: number of entries in s

Re: [PATCH WIP 02/43] IB/mlx4: Support ib_alloc_mr verb

2015-07-23 Thread Sagi Grimberg
On 7/22/2015 9:54 PM, Jason Gunthorpe wrote: On Wed, Jul 22, 2015 at 01:50:01PM -0500, Steve Wise wrote: 43 patches overflows my stack ;) I agree with Jason's suggestion. Saig, you may as well just send the ib_alloc_mr rework as a series and get it done with, I'd pass off on the core parts o

Re: [PATCH WIP 01/43] IB: Modify ib_create_mr API

2015-07-23 Thread Sagi Grimberg
On 7/23/2015 12:30 PM, Christoph Hellwig wrote: On Thu, Jul 23, 2015 at 12:57:34AM +, Hefty, Sean wrote: +enum ib_mr_type { + IB_MR_TYPE_FAST_REG, + IB_MR_TYPE_SIGNATURE, If we're going to go through the trouble of changing everything, I vote for dropping the word 'fast'. It's

Re: [PATCH WIP 01/43] IB: Modify ib_create_mr API

2015-07-23 Thread Sagi Grimberg
On 7/22/2015 10:05 PM, Jason Gunthorpe wrote: On Wed, Jul 22, 2015 at 07:58:23PM +0300, Sagi Grimberg wrote: On 7/22/2015 7:44 PM, Christoph Hellwig wrote: On Wed, Jul 22, 2015 at 10:34:05AM -0600, Jason Gunthorpe wrote: +/** + * ib_alloc_mr() - Allocates a memory region + * @pd

Re: [PATCH WIP 00/43] New fast registration API

2015-07-22 Thread Sagi Grimberg
On 7/22/2015 8:10 PM, Christoph Hellwig wrote: Thanks Sagi, this looks pretty good in general, various nitpicks nonwithstanding. The one thing I'm curious about is how we can support SRP with it's multiple MR support without too much boilerplate code. One option would be that pass an array of

Re: [PATCH WIP 38/43] iser-target: Port to new memory registration API

2015-07-22 Thread Sagi Grimberg
On 7/22/2015 8:04 PM, Christoph Hellwig wrote: @@ -2585,11 +2517,9 @@ isert_fast_reg_mr(struct isert_conn *isert_conn, struct isert_device *device = isert_conn->device; struct ib_device *ib_dev = device->ib_device; struct ib_mr *mr; struct ib_send_wr fr_wr, inv_wr;

Re: [PATCH WIP 39/43] IB/core: Add arbitrary sg_list support

2015-07-22 Thread Sagi Grimberg
On 7/22/2015 8:22 PM, Jason Gunthorpe wrote: On Wed, Jul 22, 2015 at 09:55:39AM +0300, Sagi Grimberg wrote: +enum ib_mr_flags { + IB_MR_MAP_ARB_SG = 1, +}; Something about this just seems ugly. We are back to what we were trying to avoid: Adding more types of MRs.. Is this really

Re: [PATCH WIP 02/43] IB/mlx4: Support ib_alloc_mr verb

2015-07-22 Thread Sagi Grimberg
On 7/22/2015 7:58 PM, Jason Gunthorpe wrote: On Wed, Jul 22, 2015 at 09:55:02AM +0300, Sagi Grimberg wrote: +struct ib_mr *mlx4_ib_alloc_mr(struct ib_pd *pd, + enum ib_mr_type mr_type, + u32 max_entries

Re: [PATCH WIP 01/43] IB: Modify ib_create_mr API

2015-07-22 Thread Sagi Grimberg
On 7/22/2015 8:01 PM, Jason Gunthorpe wrote: On Wed, Jul 22, 2015 at 07:59:16PM +0300, Sagi Grimberg wrote: Do we want to pull ib_get_dma_mr() here with type IB_MR_TYPE_DMA? I want to get rid of ib_get_dma_mr... That's why I asked :) So I'll take it as a no... -- To unsubscribe

Re: [PATCH WIP 01/43] IB: Modify ib_create_mr API

2015-07-22 Thread Sagi Grimberg
On 7/22/2015 7:34 PM, Jason Gunthorpe wrote: +/** + * ib_alloc_mr() - Allocates a memory region + * @pd:protection domain associated with the region + * @mr_type: memory region type + * @max_entries: maximum registration entries available + * @flags: create flags + */

Re: [PATCH WIP 01/43] IB: Modify ib_create_mr API

2015-07-22 Thread Sagi Grimberg
On 7/22/2015 7:44 PM, Christoph Hellwig wrote: On Wed, Jul 22, 2015 at 10:34:05AM -0600, Jason Gunthorpe wrote: +/** + * ib_alloc_mr() - Allocates a memory region + * @pd:protection domain associated with the region + * @mr_type: memory region type + * @max_entries: maximum r

Re: [PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-07-22 Thread Sagi Grimberg
On 7/22/2015 7:50 PM, Christoph Hellwig wrote: +/** + * ib_map_mr_sg() - Populates MR with a dma mapped SG list + * @mr:memory region + * @sg:dma mapped scatterlist + * @sg_nents: number of entries in sg + * @access:access permissions I know moving the acces

Re: [PATCH WIP 21/43] mlx5: Allocate a private page list in ib_alloc_mr

2015-07-22 Thread Sagi Grimberg
On 7/22/2015 7:46 PM, Christoph Hellwig wrote: Just curious: what's the tradeoff between allocating the page list in the core vs duplicating it in all the drivers? Does the driver variant give us any benefits? It's not necessarily a page list... (i.e. a real scatterlist). I it will make more s

Re: [PATCH WIP 37/43] xprtrdma: Port to new memory registration API

2015-07-22 Thread Sagi Grimberg
+ for (i = 0; i < nsegs;) { + sg_set_page(&frmr->sg[i], seg->mr_page, + seg->mr_len, offset_in_page(seg->mr_offset)); Cautionary note: here we’re dealing with both the “contiguous set of pages” case and the “small region of bytes in a single page”

[PATCH WIP 38/43] iser-target: Port to new memory registration API

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/isert/ib_isert.c | 116 ++-- drivers/infiniband/ulp/isert/ib_isert.h | 2 - 2 files changed, 19 insertions(+), 99 deletions(-) diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp

[PATCH WIP 39/43] IB/core: Add arbitrary sg_list support

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- include/rdma/ib_verbs.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index d543fee..cc83c39 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -133,6 +133,7 @@ enum

[PATCH WIP 30/43] mlx4: Support the new memory registration API

2015-07-21 Thread Sagi Grimberg
Just duplicated the functions to take the needed arguments from the private MR context. The old fast_reg routines will be dropped later. Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx4/main.c| 1 + drivers/infiniband/hw/mlx4/mlx4_ib.h | 3 +++ drivers/infiniband/hw/mlx4/mr.c

[PATCH WIP 18/43] cxgb4: Drop c4iw_alloc_fast_reg_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 - drivers/infiniband/hw/cxgb4/mem.c | 51 -- drivers/infiniband/hw/cxgb4/provider.c | 1 - 3 files changed, 53 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b

[PATCH WIP 29/43] mlx5: Support the new memory registration API

2015-07-21 Thread Sagi Grimberg
Just duplicated the functions to take the needed arguments from the private MR context. The old fast_reg routines will be dropped later. Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5/main.c| 1 + drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 ++ drivers/infiniband/hw/mlx5/mr.c

[PATCH WIP 19/43] cxgb3: Drop iwch_alloc_fast_reg_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/cxgb3/iwch_provider.c | 47 - 1 file changed, 47 deletions(-) diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index d0e9e2d..af55b79 100644 --- a/drivers

[PATCH WIP 31/43] ocrdma: Support the new memory registration API

2015-07-21 Thread Sagi Grimberg
Just duplicated the functions to take the needed arguments from the private MR context. The old fast_reg routines will be dropped later. --- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 1 + drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 67 + drivers/infiniband/hw/ocr

[PATCH WIP 36/43] iser: Port to new fast registration api

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iscsi_iser.h | 6 + drivers/infiniband/ulp/iser/iser_memory.c | 40 --- drivers/infiniband/ulp/iser/iser_verbs.c | 16 + 3 files changed, 17 insertions(+), 45 deletions(-) diff --git a

[PATCH WIP 42/43] iser: Accept arbitrary sg lists mapping if the device supports it

2015-07-21 Thread Sagi Grimberg
If the device support arbitrary sg list mapping (device cap IB_DEVICE_MAP_ARB_SG set) we allocate the memory regions with IB_MR_MAP_ARB_SG and skip the counce buffer work around. Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iser_memory.c | 4 drivers/infiniband/ulp/iser

[PATCH WIP 43/43] iser: Move unaligned counter increment

2015-07-21 Thread Sagi Grimberg
We don't always use bounce buffers, still we update this counter. Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iser_memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp

[PATCH WIP 37/43] xprtrdma: Port to new memory registration API

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- net/sunrpc/xprtrdma/frwr_ops.c | 80 ++--- net/sunrpc/xprtrdma/xprt_rdma.h | 4 ++- 2 files changed, 47 insertions(+), 37 deletions(-) diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c index

[PATCH WIP 40/43] mlx5: Allocate private context for arbitrary scatterlist registration

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 ++- drivers/infiniband/hw/mlx5/mr.c | 71 ++-- 2 files changed, 64 insertions(+), 13 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5

[PATCH WIP 41/43] mlx5: Add arbitrary sg list support

2015-07-21 Thread Sagi Grimberg
If ib_alloc_mr is called with IB_MR_MAP_ARB_SG, the driver allocate a private klm list instead of a private page list. And set the UMR wqe correctly when posting the fast registration. Also, expose device cap IB_DEVICE_MAP_ARB_SG Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5

[PATCH WIP 32/43] cxgb3: Support the new memory registration API

2015-07-21 Thread Sagi Grimberg
Just duplicated the functions to take the needed arguments from the private MR context. The old fast_reg routines will be dropped later. Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/cxgb3/iwch_provider.c | 12 drivers/infiniband/hw/cxgb3/iwch_qp.c | 48

[PATCH WIP 23/43] ocrdma: Allocate a private page list in ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/ocrdma/ocrdma.h | 2 ++ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 9 + 2 files changed, 11 insertions(+) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma.h b/drivers/infiniband/hw/ocrdma/ocrdma.h index b396344..37deea2

[PATCH WIP 27/43] nes: Allocate a private page list in ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/nes/nes_verbs.c | 27 +++ drivers/infiniband/hw/nes/nes_verbs.h | 5 + 2 files changed, 32 insertions(+) diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 752e6ea

[PATCH WIP 24/43] cxgb3: Allocate a provate page list in ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/cxgb3/iwch_provider.c | 9 + drivers/infiniband/hw/cxgb3/iwch_provider.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index af55b79

[PATCH WIP 33/43] cxgb4: Support the new memory registration API

2015-07-21 Thread Sagi Grimberg
Just duplicated the functions to take the needed arguments from the private MR context. The old fast_reg routines will be dropped later. Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 3 ++ drivers/infiniband/hw/cxgb4/mem.c | 11 + drivers/infiniband/hw

[PATCH WIP 28/43] IB/core: Introduce new fast registration API

2015-07-21 Thread Sagi Grimberg
-off-by: Sagi Grimberg --- drivers/infiniband/core/verbs.c | 123 include/rdma/ib_verbs.h | 37 2 files changed, 160 insertions(+) diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index beed431..9875163

[PATCH WIP 34/43] nes: Support the new memory registration API

2015-07-21 Thread Sagi Grimberg
Just duplicated the functions to take the needed arguments from the private MR context. The old fast_reg routines will be dropped later. Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/nes/nes_verbs.c | 85 +++ 1 file changed, 85 insertions(+) diff --git

[PATCH WIP 25/43] cxgb4: Allocate a private page list in ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 4 drivers/infiniband/hw/cxgb4/mem.c | 15 +++ 2 files changed, 19 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index 886be9c..e529ace

[PATCH WIP 35/43] qib: Support the new memory registration API

2015-07-21 Thread Sagi Grimberg
Just duplicated the functions to take the needed arguments from the private MR context. The old fast_reg routines will be dropped later. Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/qib/qib_keys.c | 56 +++ drivers/infiniband/hw/qib/qib_mr.c| 11

[PATCH WIP 26/43] qib: Allocate a private page list in ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/qib/qib_mr.c| 9 + drivers/infiniband/hw/qib/qib_verbs.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/drivers/infiniband/hw/qib/qib_mr.c b/drivers/infiniband/hw/qib/qib_mr.c index 2a4afea..a58a347 100644 --- a/drivers

[PATCH WIP 22/43] mlx4: Allocate a private page list in ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx4/mlx4_ib.h | 5 drivers/infiniband/hw/mlx4/mr.c | 52 +--- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4

[PATCH WIP 21/43] mlx5: Allocate a private page list in ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 5 drivers/infiniband/hw/mlx5/mr.c | 45 2 files changed, 50 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index

[PATCH WIP 10/43] IB/srp: Convert to ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/srp/ib_srp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 1218738..7747587 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b

[PATCH WIP 14/43] mlx4: Drop mlx4_ib_alloc_fast_reg_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx4/main.c| 1 - drivers/infiniband/hw/mlx4/mlx4_ib.h | 2 -- drivers/infiniband/hw/mlx4/mr.c | 33 - 3 files changed, 36 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers

[PATCH WIP 13/43] mlx5: Drop mlx5_ib_alloc_fast_reg_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5/main.c| 1 - drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 -- drivers/infiniband/hw/mlx5/mr.c | 44 3 files changed, 47 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers

[PATCH WIP 09/43] iser-target: Convert to ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/isert/ib_isert.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index f0b7c9b..94395ce 100644 --- a/drivers/infiniband/ulp/isert

[PATCH WIP 11/43] xprtrdma, svcrdma: Convert to ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- net/sunrpc/xprtrdma/frwr_ops.c | 6 +++--- net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c index 63f282e..517efed 100644

[PATCH WIP 12/43] RDS: Convert to ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- net/rds/iw_rdma.c | 5 +++-- net/rds/iw_send.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c index dba8d08..dac0131 100644 --- a/net/rds/iw_rdma.c +++ b/net/rds/iw_rdma.c @@ -667,11 +667,12

[PATCH WIP 20/43] IB/core: Drop ib_alloc_fast_reg_mr

2015-07-21 Thread Sagi Grimberg
Fully replaced by a more generic and suitable ib_alloc_mr Signed-off-by: Sagi Grimberg --- drivers/infiniband/core/verbs.c | 21 - include/rdma/ib_verbs.h | 11 --- 2 files changed, 32 deletions(-) diff --git a/drivers/infiniband/core/verbs.c b/drivers

[PATCH WIP 17/43] nes: Drop nes_alloc_fast_reg_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/nes/nes_verbs.c | 66 --- 1 file changed, 66 deletions(-) diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index ac63763..752e6ea 100644 --- a/drivers/infiniband/hw

[PATCH WIP 16/43] qib: Drop qib_alloc_fast_reg_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/qib/qib_mr.c| 17 - drivers/infiniband/hw/qib/qib_verbs.c | 1 - drivers/infiniband/hw/qib/qib_verbs.h | 2 -- 3 files changed, 20 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_mr.c b/drivers/infiniband/hw

[PATCH WIP 15/43] ocrdma: Drop ocrdma_alloc_frmr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 1 - drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 41 - drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 1 - 3 files changed, 43 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma

[PATCH WIP 04/43] iw_cxgb4: Support ib_alloc_mr verb

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 4 +++ drivers/infiniband/hw/cxgb4/mem.c | 57 ++ drivers/infiniband/hw/cxgb4/provider.c | 1 + 3 files changed, 62 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h

[PATCH WIP 02/43] IB/mlx4: Support ib_alloc_mr verb

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx4/main.c| 1 + drivers/infiniband/hw/mlx4/mlx4_ib.h | 4 drivers/infiniband/hw/mlx4/mr.c | 38 3 files changed, 43 insertions(+) diff --git a/drivers/infiniband/hw/mlx4/main.c b

[PATCH WIP 06/43] nes: Support ib_alloc_mr verb

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/nes/nes_verbs.c | 73 +++ 1 file changed, 73 insertions(+) diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index fbc43e5..ac63763 100644 --- a/drivers/infiniband/hw

[PATCH WIP 03/43] ocrdma: Support ib_alloc_mr verb

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 1 + drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 47 + drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 4 +++ 3 files changed, 52 insertions(+) diff --git a/drivers/infiniband/hw/ocrdma

[PATCH WIP 05/43] cxgb3: Support ib_alloc_mr verb

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/cxgb3/iwch_provider.c | 53 + 1 file changed, 53 insertions(+) diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index b1b7323..d0e9e2d 100644 --- a/drivers

[PATCH WIP 08/43] IB/iser: Convert to ib_alloc_mr

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iser_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 6be4d4a..ecc3265 100644 --- a/drivers/infiniband/ulp/iser

[PATCH WIP 00/43] New fast registration API

2015-07-21 Thread Sagi Grimberg
;s own function which will allow them to lose their page list duplication. I haven't done that yet. Comments and review are welcomed (and needed!). Sorry for the long series, but it's kinda transverse... The code/patches can be found in: https://github.com/sagigrimberg/linux/tree

[PATCH WIP 01/43] IB: Modify ib_create_mr API

2015-07-21 Thread Sagi Grimberg
Use ib_alloc_mr with specific parameters. Change the existing callers. Signed-off-by: Sagi Grimberg --- drivers/infiniband/core/verbs.c | 20 -- drivers/infiniband/hw/mlx5/main.c| 2 +- drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 -- drivers/infiniband/hw

[PATCH WIP 07/43] qib: Support ib_alloc_mr verb

2015-07-21 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/qib/qib_mr.c| 23 +++ drivers/infiniband/hw/qib/qib_verbs.c | 1 + drivers/infiniband/hw/qib/qib_verbs.h | 5 + 3 files changed, 29 insertions(+) diff --git a/drivers/infiniband/hw/qib/qib_mr.c b/drivers

[PATCH] mlx5: Expose correct page_size_cap in device attributes

2015-07-21 Thread Sagi Grimberg
Should be all the page sizes that are supported by the device. Reported-by: Jason Gunthorpe Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5/main.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw

Re: Kernel fast memory registration API proposal [RFC]

2015-07-21 Thread Sagi Grimberg
Bleh... seems like a great effort just to find that out. Isn't it better to just ask for a page_size arg? So who computes page_size and how? Don't just punt things to a caller without really explaining how the caller is supposed to use it correctly. I'd imagine that the ULP knows when it regi

Re: RFC: Immediate data support for SRP

2015-07-21 Thread Sagi Grimberg
So you have 140% better IOPS with immediate-data vs. non immediate data?! numberz? No, the improvement was to avoid memory copy from the pre-posted recieve buffer (with immediate-data) to an allocated buffer. Instead the receive buffer is handed to the backend to do IO. This shows up to 40%

Re: RFC: Immediate data support for SRP

2015-07-21 Thread Sagi Grimberg
On 7/21/2015 3:03 AM, Bart Van Assche wrote: On 07/19/2015 09:07 AM, Sagi Grimberg wrote: On 7/16/2015 6:25 PM, Bart Van Assche wrote: As you probably know for write requests "immediate data" means sending the data in the same packet as the write command instead of sending it as

Re: [PATCH RFC] svcrdma: Fix possible over population fast_reg_page_list

2015-07-20 Thread Sagi Grimberg
On 7/20/2015 8:13 PM, Chuck Lever wrote: On Jul 20, 2015, at 1:00 PM, Sagi Grimberg wrote: When accounting the needed_pages, we need to look into the page_list->max_page_list_len and not the global context xprt->sc_frmr_pg_list_len. Signed-off-by: Sagi Grimberg --- net/sunrpc/xp

Re: [PATCH] mlx5: Fix missing device local_dma_lkey

2015-07-20 Thread Sagi Grimberg
On 7/20/2015 8:08 PM, Chuck Lever wrote: On Jul 20, 2015, at 12:54 PM, Sagi Grimberg wrote: The mlx5 driver exposes device capability IB_DEVICE_LOCAL_DMA_LKEY but does not set the the device local_dma_lkey. This breaks rpcrdma drivers. Query and set this lkey when creating the device

Re: Kernel fast memory registration API proposal [RFC]

2015-07-20 Thread Sagi Grimberg
On 7/20/2015 8:00 PM, Jason Gunthorpe wrote: On Mon, Jul 20, 2015 at 07:27:52PM +0300, Sagi Grimberg wrote: I'm thinking now that this should have an input argument of block_size. Maybe in the future ULPs would want to register huge pages, it will be a shame to map it into PAGE_SIZE c

[PATCH RFC] svcrdma: Fix possible over population fast_reg_page_list

2015-07-20 Thread Sagi Grimberg
When accounting the needed_pages, we need to look into the page_list->max_page_list_len and not the global context xprt->sc_frmr_pg_list_len. Signed-off-by: Sagi Grimberg --- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

[PATCH] mlx5: Fix missing device local_dma_lkey

2015-07-20 Thread Sagi Grimberg
The mlx5 driver exposes device capability IB_DEVICE_LOCAL_DMA_LKEY but does not set the the device local_dma_lkey. This breaks rpcrdma drivers. Query and set this lkey when creating the device resources. Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5/main.c| 9

Re: Kernel fast memory registration API proposal [RFC]

2015-07-20 Thread Sagi Grimberg
On 7/20/2015 7:23 PM, Jason Gunthorpe wrote: On Sun, Jul 19, 2015 at 08:33:24AM +0300, Sagi Grimberg wrote: I was thinking that the user won't explicitly say which key it registers and it will be decided from the registration itself. Meaning, the registration code will do: Please don

Re: Kernel fast memory registration API proposal [RFC]

2015-07-20 Thread Sagi Grimberg
I'm thinking now that this should have an input argument of block_size. Maybe in the future ULPs would want to register huge pages, it will be a shame to map it into PAGE_SIZE chunks... Why wouldn't it just transparently support huge pages? sg seems to have enough information. I'm not sure I k

Re: RFC: Immediate data support for SRP

2015-07-20 Thread Sagi Grimberg
On 7/20/2015 12:43 AM, Or Gerlitz wrote: On Sun, Jul 19, 2015 at 7:07 PM, Sagi Grimberg wrote: On 7/16/2015 6:25 PM, Bart Van Assche wrote: I agree it would definitely help as the lack of immediate data emphasizes the additional latency of doing rdma reads. Sagi, do we have black box

<    2   3   4   5   6   7   8   9   10   11   >