From: "Steve Wise" <swise@opengridcomputing.com>
To: "'Sagi Grimberg'" <sagig@mellanox.com>,
"'Doug Ledford'" <dledford@redhat.com>
Cc: <linux-rdma@vger.kernel.org>, <linux-nfs@vger.kernel.org>,
<target-devel@vger.kernel.org>
Subject: RE: [PATCH for-4.3 11/15] iw_cxgb4: Support ib_alloc_mr verb
Date: Fri, 7 Aug 2015 10:06:26 -0500 [thread overview]
Message-ID: <003301d0d122$a1e46ee0$e5ad4ca0$@opengridcomputing.com> (raw)
In-Reply-To: <1438241568-3685-12-git-send-email-sagig@mellanox.com>
> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-owner@vger.kernel.org] On Behalf Of Sagi Grimberg
> Sent: Thursday, July 30, 2015 2:33 AM
> To: linux-rdma@vger.kernel.org; linux-nfs@vger.kernel.org; target-devel@vger.kernel.org
> Subject: [PATCH for-4.3 11/15] iw_cxgb4: Support ib_alloc_mr verb
>
> Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
> ---
> drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 4 +++-
> drivers/infiniband/hw/cxgb4/mem.c | 12 +++++++++---
> drivers/infiniband/hw/cxgb4/provider.c | 2 +-
> 3 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
> index cc77844..c7bb38c 100644
> --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
> +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
> @@ -970,7 +970,9 @@ void c4iw_free_fastreg_pbl(struct ib_fast_reg_page_list *page_list);
> struct ib_fast_reg_page_list *c4iw_alloc_fastreg_pbl(
> struct ib_device *device,
> int page_list_len);
> -struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth);
> +struct ib_mr *c4iw_alloc_mr(struct ib_pd *pd,
> + enum ib_mr_type mr_type,
> + u32 max_num_sg);
> int c4iw_dealloc_mw(struct ib_mw *mw);
> struct ib_mw *c4iw_alloc_mw(struct ib_pd *pd, enum ib_mw_type type);
> struct ib_mr *c4iw_reg_user_mr(struct ib_pd *pd, u64 start,
> diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
> index cff815b..026b91e 100644
> --- a/drivers/infiniband/hw/cxgb4/mem.c
> +++ b/drivers/infiniband/hw/cxgb4/mem.c
> @@ -853,7 +853,9 @@ int c4iw_dealloc_mw(struct ib_mw *mw)
> return 0;
> }
>
> -struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth)
> +struct ib_mr *c4iw_alloc_mr(struct ib_pd *pd,
> + enum ib_mr_type mr_type,
> + u32 max_num_sg)
> {
> struct c4iw_dev *rhp;
> struct c4iw_pd *php;
> @@ -862,6 +864,10 @@ struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth)
> u32 stag = 0;
> int ret = 0;
>
> + if (mr_type != IB_MR_TYPE_MEM_REG ||
> + max_num_sg > t4_max_fr_depth(use_dsgl))
> + return ERR_PTR(-EINVAL);
> +
> php = to_c4iw_pd(pd);
> rhp = php->rhp;
> mhp = kzalloc(sizeof(*mhp), GFP_KERNEL);
Hey Sagi/Doug,
The above change introduces a regression with NFSRDMA over cxgb4. Prior to this commit, cxgb4 allowed frmr and page list
allocations that exceeded the device max. It does enforce the max when processing a fastreg WR though. This is definitely a bug in
cxgb4, but was benign. Further, the NFSRDMA server currently allocates frmrs and page_lists using RPCSVC_MAXPAGES for max_num_sg
which exceeds the max supported by cxgb4. Thus with the above patch, NFSRDMA doesn't work at all over cxgb4. :(
So I need to fix NFSRDMA for sure. But adding a fix on top of the above patch will leave a bisectable window where NFSRDMA is
broken on cxgb4. Is it too late to change the above patch so the regression is avoided? Then I can provide a new series of patches
to fix the NFS server to mind the device max, and fix cxgb4 to enforce the device max.
If it is too much of a pain to alter this patch, then I'll just submit the NFSRDMA fix and live with the bisect issue...
Thoughts?
Steve.
WARNING: multiple messages have this Message-ID (diff)
From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Sagi Grimberg' <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
'Doug Ledford' <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: RE: [PATCH for-4.3 11/15] iw_cxgb4: Support ib_alloc_mr verb
Date: Fri, 7 Aug 2015 10:06:26 -0500 [thread overview]
Message-ID: <003301d0d122$a1e46ee0$e5ad4ca0$@opengridcomputing.com> (raw)
In-Reply-To: <1438241568-3685-12-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Sagi Grimberg
> Sent: Thursday, July 30, 2015 2:33 AM
> To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: [PATCH for-4.3 11/15] iw_cxgb4: Support ib_alloc_mr verb
>
> Signed-off-by: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 4 +++-
> drivers/infiniband/hw/cxgb4/mem.c | 12 +++++++++---
> drivers/infiniband/hw/cxgb4/provider.c | 2 +-
> 3 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
> index cc77844..c7bb38c 100644
> --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
> +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
> @@ -970,7 +970,9 @@ void c4iw_free_fastreg_pbl(struct ib_fast_reg_page_list *page_list);
> struct ib_fast_reg_page_list *c4iw_alloc_fastreg_pbl(
> struct ib_device *device,
> int page_list_len);
> -struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth);
> +struct ib_mr *c4iw_alloc_mr(struct ib_pd *pd,
> + enum ib_mr_type mr_type,
> + u32 max_num_sg);
> int c4iw_dealloc_mw(struct ib_mw *mw);
> struct ib_mw *c4iw_alloc_mw(struct ib_pd *pd, enum ib_mw_type type);
> struct ib_mr *c4iw_reg_user_mr(struct ib_pd *pd, u64 start,
> diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
> index cff815b..026b91e 100644
> --- a/drivers/infiniband/hw/cxgb4/mem.c
> +++ b/drivers/infiniband/hw/cxgb4/mem.c
> @@ -853,7 +853,9 @@ int c4iw_dealloc_mw(struct ib_mw *mw)
> return 0;
> }
>
> -struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth)
> +struct ib_mr *c4iw_alloc_mr(struct ib_pd *pd,
> + enum ib_mr_type mr_type,
> + u32 max_num_sg)
> {
> struct c4iw_dev *rhp;
> struct c4iw_pd *php;
> @@ -862,6 +864,10 @@ struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth)
> u32 stag = 0;
> int ret = 0;
>
> + if (mr_type != IB_MR_TYPE_MEM_REG ||
> + max_num_sg > t4_max_fr_depth(use_dsgl))
> + return ERR_PTR(-EINVAL);
> +
> php = to_c4iw_pd(pd);
> rhp = php->rhp;
> mhp = kzalloc(sizeof(*mhp), GFP_KERNEL);
Hey Sagi/Doug,
The above change introduces a regression with NFSRDMA over cxgb4. Prior to this commit, cxgb4 allowed frmr and page list
allocations that exceeded the device max. It does enforce the max when processing a fastreg WR though. This is definitely a bug in
cxgb4, but was benign. Further, the NFSRDMA server currently allocates frmrs and page_lists using RPCSVC_MAXPAGES for max_num_sg
which exceeds the max supported by cxgb4. Thus with the above patch, NFSRDMA doesn't work at all over cxgb4. :(
So I need to fix NFSRDMA for sure. But adding a fix on top of the above patch will leave a bisectable window where NFSRDMA is
broken on cxgb4. Is it too late to change the above patch so the regression is avoided? Then I can provide a new series of patches
to fix the NFS server to mind the device max, and fix cxgb4 to enforce the device max.
If it is too much of a pain to alter this patch, then I'll just submit the NFSRDMA fix and live with the bisect issue...
Thoughts?
Steve.
--
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
next prev parent reply other threads:[~2015-08-07 15:06 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 7:32 [PATCH for-4.3 00/15] Modify MR allocation API Sagi Grimberg
2015-07-30 7:32 ` Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 01/15] IB/core: Get rid of redundant verb ib_destroy_mr Sagi Grimberg
2015-07-30 7:32 ` Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 02/15] IB: Modify ib_create_mr API Sagi Grimberg
2015-07-30 14:50 ` Steve Wise
2015-07-30 14:50 ` Steve Wise
2015-07-30 7:32 ` [PATCH for-4.3 03/15] IB/iser: Convert to ib_alloc_mr Sagi Grimberg
2015-07-30 7:32 ` Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 04/15] iser-target: " Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 05/15] IB/srp: " Sagi Grimberg
2015-07-31 22:41 ` Bart Van Assche
2015-07-31 22:41 ` Bart Van Assche
2015-07-30 7:32 ` [PATCH for-4.3 06/15] xprtrdma, svcrdma: " Sagi Grimberg
2015-07-30 7:32 ` Sagi Grimberg
2015-08-06 14:22 ` Anna Schumaker
2015-08-06 14:22 ` Anna Schumaker
2015-07-30 7:32 ` [PATCH for-4.3 07/15] RDS: " Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 08/15] mlx5: Drop mlx5_ib_alloc_fast_reg_mr Sagi Grimberg
2015-07-30 7:32 ` Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 09/15] mlx4: Support ib_alloc_mr verb Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 10/15] ocrdma: " Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 11/15] iw_cxgb4: " Sagi Grimberg
2015-08-07 15:06 ` Steve Wise [this message]
2015-08-07 15:06 ` Steve Wise
2015-08-07 15:13 ` Christoph Hellwig
2015-08-07 15:13 ` Christoph Hellwig
2015-08-07 16:19 ` Steve Wise
2015-08-07 16:19 ` Steve Wise
2015-08-07 16:26 ` Steve Wise
2015-08-07 16:26 ` 'Christoph Hellwig'
2015-08-07 16:26 ` 'Christoph Hellwig'
2015-08-07 16:29 ` Steve Wise
2015-08-07 16:29 ` Steve Wise
2015-08-07 16:31 ` 'Christoph Hellwig'
2015-08-07 16:31 ` 'Christoph Hellwig'
2015-07-30 7:32 ` [PATCH for-4.3 12/15] cxgb3: " Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 13/15] nes: " Sagi Grimberg
2015-07-30 7:32 ` [PATCH for-4.3 14/15] qib: " Sagi Grimberg
2015-07-30 7:32 ` Sagi Grimberg
2015-07-31 11:41 ` Marciniszyn, Mike
2015-07-31 11:41 ` Marciniszyn, Mike
2015-07-31 12:52 ` Doug Ledford
2015-07-31 12:52 ` Doug Ledford
2015-08-07 14:47 ` Marciniszyn, Mike
2015-07-30 7:32 ` [PATCH for-4.3 15/15] IB/core: Drop ib_alloc_fast_reg_mr Sagi Grimberg
2015-07-30 13:53 ` [PATCH for-4.3 00/15] Modify MR allocation API Christoph Hellwig
2015-07-30 13:53 ` Christoph Hellwig
2015-07-30 14:56 ` Steve Wise
2015-07-30 16:42 ` Doug Ledford
2015-07-30 16:42 ` Doug Ledford
2015-07-30 17:22 ` Jason Gunthorpe
2015-07-30 17:22 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003301d0d122$a1e46ee0$e5ad4ca0$@opengridcomputing.com' \
--to=swise@opengridcomputing.com \
--cc=dledford@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sagig@mellanox.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.