linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 00/24] New fast registration API
@ 2015-09-17  9:42 Sagi Grimberg
  2015-09-17  9:42 ` [PATCH v1 01/24] IB/core: Introduce new " Sagi Grimberg
                   ` (27 more replies)
  0 siblings, 28 replies; 67+ messages in thread
From: Sagi Grimberg @ 2015-09-17  9:42 UTC (permalink / raw)
  To: linux-rdma; +Cc: linux-nfs, Nicholas A. Bellinger

Hi all,

As discussed on the linux-rdma list, there is plenty of room for
improvement in our memory registration APIs. We keep finding
ULPs that are duplicating code, sometimes use wrong strategies
and mis-use our current API.

As a first step, this patch set replaces the fast registration API
to accept a kernel common struct scatterlist and takes care of
the page vector construction in the core layer with hooks for the
drivers HW specific assignments. This allows to remove a common
code duplication as it was done in each and every ULP driver.

The changes from v0 (WIP) are:
- Rebased on top of 4.3-rc1 + Christoph's ib_send_wr conversion patches

- Allow the ULP to pass page_size argument to ib_map_mr_sg in order
  to have it work better in some specific workloads. This suggestion
  came from Bart Van Assache which pointed out that some applications
  might use page sizes significantly smaller than the system PAGE_SIZE
  of specific architectures

- Fixed some logical bugs in ib_sg_to_pages

- Added a set_page function pointer for drivers to pass to ib_sg_to_pages
  so some drivers (e.g mlx4, mlx5, nes) can avoid keeping a second page
  vector and/or re-iterate on the page vector in order to perform HW specific
  assignments (big/little endian conversion, extra flags)

- Converted SRP initiator and RDS iwarp ULPs to the new API

- Removed fast registration code from hfi1 driver (as it isn't supported
  anyway). I assume that the correct place to get the support back would
  be in a shared SW library (hfi1, qib, rxe).

- Updated the change logs

So far my tests covered:
- ULPs:
	* iser initiator
	* iser target
	* xprtrdma
	* svcrdma
- Drivers:
	* mlx4
	* mlx5
	* Steve Wise was kind enough to run NFS client/server over cxgb4 and I
	  have yet to receive any negative feedback from him.

I don't have access to other HW devices (qib, nes) nor iwarp devices so RDS is
compile tested only.

I'm targeting this to 4.4 so I'll appreciate more feedback and a bigger testing
coverage.

The code is available at: https://github.com/sagigrimberg/linux/tree/reg_api.3

Sagi Grimberg (24):
  IB/core: Introduce new fast registration API
  IB/mlx5: Remove dead fmr code
  IB/mlx5: Support the new memory registration API
  IB/mlx4: Support the new memory registration API
  RDMA/ocrdma: Support the new memory registration API
  RDMA/cxgb3: Support the new memory registration API
  iw_cxgb4: Support the new memory registration API
  IB/qib: Support the new memory registration API
  RDMA/nes: Support the new memory registration API
  IB/iser: Port to new fast registration API
  iser-target: Port to new memory registration API
  xprtrdma: Port to new memory registration API
  svcrdma: Port to new memory registration API
  RDS/IW: Convert to new memory registration API
  IB/srp: Convert to new memory registration API
  IB/mlx5: Remove old FRWR API support
  IB/mlx4: Remove old FRWR API support
  RDMA/ocrdma: Remove old FRWR API
  RDMA/cxgb3: Remove old FRWR API
  iw_cxgb4: Remove old FRWR API
  IB/qib: Remove old FRWR API
  RDMA/nes: Remove old FRWR API
  IB/hfi1: Remove Old fast registraion API support
  IB/core: Remove old fast registration API

 drivers/infiniband/core/verbs.c             | 132 ++++++++++++---
 drivers/infiniband/hw/cxgb3/iwch_cq.c       |   2 +-
 drivers/infiniband/hw/cxgb3/iwch_provider.c |  39 +++--
 drivers/infiniband/hw/cxgb3/iwch_provider.h |   2 +
 drivers/infiniband/hw/cxgb3/iwch_qp.c       |  37 +++--
 drivers/infiniband/hw/cxgb4/cq.c            |   2 +-
 drivers/infiniband/hw/cxgb4/iw_cxgb4.h      |  25 +--
 drivers/infiniband/hw/cxgb4/mem.c           |  61 +++----
 drivers/infiniband/hw/cxgb4/provider.c      |   3 +-
 drivers/infiniband/hw/cxgb4/qp.c            |  46 +++---
 drivers/infiniband/hw/mlx4/cq.c             |   2 +-
 drivers/infiniband/hw/mlx4/main.c           |   3 +-
 drivers/infiniband/hw/mlx4/mlx4_ib.h        |  22 +--
 drivers/infiniband/hw/mlx4/mr.c             | 120 ++++++++------
 drivers/infiniband/hw/mlx4/qp.c             |  30 ++--
 drivers/infiniband/hw/mlx5/cq.c             |   4 +-
 drivers/infiniband/hw/mlx5/main.c           |   3 +-
 drivers/infiniband/hw/mlx5/mlx5_ib.h        |  47 +-----
 drivers/infiniband/hw/mlx5/mr.c             | 107 +++++++-----
 drivers/infiniband/hw/mlx5/qp.c             | 140 ++++++++--------
 drivers/infiniband/hw/nes/nes_hw.h          |   6 -
 drivers/infiniband/hw/nes/nes_verbs.c       | 161 +++++++-----------
 drivers/infiniband/hw/nes/nes_verbs.h       |   4 +
 drivers/infiniband/hw/ocrdma/ocrdma.h       |   2 +
 drivers/infiniband/hw/ocrdma/ocrdma_main.c  |   3 +-
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 151 ++++++++---------
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.h |   7 +-
 drivers/infiniband/hw/qib/qib_keys.c        |  40 ++---
 drivers/infiniband/hw/qib/qib_mr.c          |  46 +++---
 drivers/infiniband/hw/qib/qib_verbs.c       |  13 +-
 drivers/infiniband/hw/qib/qib_verbs.h       |  13 +-
 drivers/infiniband/ulp/iser/iscsi_iser.h    |   8 +-
 drivers/infiniband/ulp/iser/iser_memory.c   |  53 +++---
 drivers/infiniband/ulp/iser/iser_verbs.c    |  16 +-
 drivers/infiniband/ulp/isert/ib_isert.c     | 129 +++------------
 drivers/infiniband/ulp/isert/ib_isert.h     |   2 -
 drivers/infiniband/ulp/srp/ib_srp.c         | 248 +++++++++++++++++-----------
 drivers/infiniband/ulp/srp/ib_srp.h         |  11 +-
 drivers/staging/hfi1/keys.c                 |  55 ------
 drivers/staging/hfi1/mr.c                   |  32 +---
 drivers/staging/hfi1/verbs.c                |   9 +-
 drivers/staging/hfi1/verbs.h                |   8 -
 include/linux/sunrpc/svc_rdma.h             |   6 +-
 include/rdma/ib_verbs.h                     |  70 +++-----
 net/rds/iw.h                                |   5 +-
 net/rds/iw_rdma.c                           | 118 +++++--------
 net/rds/iw_send.c                           |  57 ++++---
 net/sunrpc/xprtrdma/frwr_ops.c              | 112 +++++++------
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c     |  76 +++++----
 net/sunrpc/xprtrdma/svc_rdma_transport.c    |  34 ++--
 net/sunrpc/xprtrdma/xprt_rdma.h             |   3 +-
 51 files changed, 1067 insertions(+), 1258 deletions(-)

-- 
1.8.4.3


^ permalink raw reply	[flat|nested] 67+ messages in thread

end of thread, other threads:[~2015-10-07 16:45 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17  9:42 [PATCH v1 00/24] New fast registration API Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 01/24] IB/core: Introduce new " Sagi Grimberg
2015-09-22 21:21   ` Bart Van Assche
2015-09-24  7:37     ` Sagi Grimberg
2015-09-28 20:57       ` Bart Van Assche
2015-09-29  5:59         ` Christoph Hellwig
2015-09-29  6:47           ` Sagi Grimberg
2015-09-29  6:49             ` Sagi Grimberg
2015-09-29  6:42         ` Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 02/24] IB/mlx5: Remove dead fmr code Sagi Grimberg
2015-09-22 21:24   ` Bart Van Assche
2015-09-17  9:42 ` [PATCH v1 03/24] IB/mlx5: Support the new memory registration API Sagi Grimberg
2015-09-22 21:27   ` Bart Van Assche
2015-09-24  7:39     ` Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 04/24] IB/mlx4: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 05/24] RDMA/ocrdma: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 06/24] RDMA/cxgb3: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 07/24] iw_cxgb4: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 08/24] IB/qib: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 09/24] RDMA/nes: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 10/24] IB/iser: Port to new fast " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 11/24] iser-target: Port to new memory " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 12/24] xprtrdma: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 13/24] svcrdma: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 14/24] RDS/IW: Convert " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 15/24] IB/srp: " Sagi Grimberg
2015-09-22 21:58   ` Bart Van Assche
2015-09-24  9:06     ` Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 16/24] IB/mlx5: Remove old FRWR API support Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 17/24] IB/mlx4: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 18/24] RDMA/ocrdma: Remove old FRWR API Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 19/24] RDMA/cxgb3: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 20/24] iw_cxgb4: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 21/24] IB/qib: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 22/24] RDMA/nes: " Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 23/24] IB/hfi1: Remove Old fast registraion API support Sagi Grimberg
2015-09-17  9:42 ` [PATCH v1 24/24] IB/core: Remove old fast registration API Sagi Grimberg
2015-09-19 22:45 ` [PATCH v1 00/24] New " Christoph Hellwig
2015-09-24  6:53   ` Sagi Grimberg
2015-09-24 13:39     ` Christoph Hellwig
2015-09-19 23:20 ` santosh.shilimkar
2015-09-20  9:36   ` Sagi Grimberg
2015-09-21 23:28     ` santosh.shilimkar
2015-09-22  7:19       ` Sagi Grimberg
2015-09-22  7:56         ` Sagi Grimberg
2015-09-22 18:23           ` santosh shilimkar
2015-09-22 21:22 ` Bart Van Assche
2015-09-24  7:40   ` Sagi Grimberg
2015-09-29 19:03 ` Bart Van Assche
2015-09-29 20:58   ` Sagi Grimberg
2015-09-30  6:47     ` Sagi Grimberg
2015-09-30 18:59     ` Bart Van Assche
2015-09-30 20:15       ` Bart Van Assche
2015-10-01  7:16         ` Sagi Grimberg
2015-10-01 17:53           ` Bart Van Assche
2015-10-01 20:58             ` Bart Van Assche
     [not found]               ` <35618B90-4D6E-4036-A69B-4405F020D440@dev.mellanox.co.il>
2015-10-02 15:37                 ` Bart Van Assche
2015-10-06  8:37                   ` Sagi Grimberg
2015-10-06 18:49                     ` Bart Van Assche
2015-10-07  6:42                       ` Sagi Grimberg
2015-10-07 15:46                         ` Bart Van Assche
2015-10-07 15:48                           ` Sagi Grimberg
2015-10-07  9:20                     ` Christoph Hellwig
2015-10-07  9:25                       ` Sagi Grimberg
2015-10-07  9:36                         ` Christoph Hellwig
2015-10-07 10:00                           ` Sagi Grimberg
2015-10-07 16:30                       ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).