mbox series

[for-next,v2,0/3] Rework system pinning

Message ID 167467667721.3649436.2151007723733044404.stgit@awfm-02.cornelisnetworks.com (mailing list archive)
Headers show
Series Rework system pinning | expand

Message

Dennis Dalessandro Jan. 25, 2023, 8:01 p.m. UTC
This series from Pat & Brendan reworks the system memory pinning in our driver
to better handle different types of memory buffers that are passed into. 

Changes Since v1:
----------------
Added missing commit messages to patches 1 and 2.

---

Patrick Kelsey (3):
      IB/hfi1: Fix math bugs in hfi1_can_pin_pages()
      IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
      IB/hfi1: Do all memory-pinning through hfi1's pinning interface


 drivers/infiniband/hw/hfi1/Makefile     |   2 +
 drivers/infiniband/hw/hfi1/file_ops.c   |  51 ++-
 drivers/infiniband/hw/hfi1/init.c       |   5 +
 drivers/infiniband/hw/hfi1/ipoib_tx.c   |   7 +-
 drivers/infiniband/hw/hfi1/mmu_rb.c     |  96 ++--
 drivers/infiniband/hw/hfi1/mmu_rb.h     |  30 +-
 drivers/infiniband/hw/hfi1/pin_system.c | 567 ++++++++++++++++++++++++
 drivers/infiniband/hw/hfi1/pinning.c    |  55 +++
 drivers/infiniband/hw/hfi1/pinning.h    |  94 ++++
 drivers/infiniband/hw/hfi1/sdma.c       |  33 +-
 drivers/infiniband/hw/hfi1/sdma.h       |  77 ++--
 drivers/infiniband/hw/hfi1/sdma_txreq.h |   2 +
 drivers/infiniband/hw/hfi1/trace_mmu.h  |   4 -
 drivers/infiniband/hw/hfi1/user_pages.c |  61 ++-
 drivers/infiniband/hw/hfi1/user_sdma.c  | 354 ++-------------
 drivers/infiniband/hw/hfi1/user_sdma.h  |  24 +-
 drivers/infiniband/hw/hfi1/verbs.c      |   5 +-
 drivers/infiniband/hw/hfi1/vnic_sdma.c  |   6 +-
 include/uapi/rdma/hfi/hfi1_ioctl.h      |  18 +
 include/uapi/rdma/hfi/hfi1_user.h       |  31 +-
 include/uapi/rdma/rdma_user_ioctl.h     |   3 +
 21 files changed, 1046 insertions(+), 479 deletions(-)
 create mode 100644 drivers/infiniband/hw/hfi1/pin_system.c
 create mode 100644 drivers/infiniband/hw/hfi1/pinning.c
 create mode 100644 drivers/infiniband/hw/hfi1/pinning.h

--
-Denny

Comments

Leon Romanovsky Feb. 6, 2023, 11:03 a.m. UTC | #1
On Wed, Jan 25, 2023 at 03:01:33PM -0500, Dennis Dalessandro wrote:
> This series from Pat & Brendan reworks the system memory pinning in our driver
> to better handle different types of memory buffers that are passed into. 
> 
> Changes Since v1:
> ----------------
> Added missing commit messages to patches 1 and 2.
> 
> ---
> 
> Patrick Kelsey (3):
>       IB/hfi1: Fix math bugs in hfi1_can_pin_pages()
>       IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
>       IB/hfi1: Do all memory-pinning through hfi1's pinning interface
> 

<...>

>  include/uapi/rdma/hfi/hfi1_ioctl.h      |  18 +
>  include/uapi/rdma/hfi/hfi1_user.h       |  31 +-
>  include/uapi/rdma/rdma_user_ioctl.h     |   3 +

Where can we see user-space part of these changes?

Thanks
Dennis Dalessandro Feb. 6, 2023, 2:17 p.m. UTC | #2
On 2/6/23 6:03 AM, Leon Romanovsky wrote:
> On Wed, Jan 25, 2023 at 03:01:33PM -0500, Dennis Dalessandro wrote:
>> This series from Pat & Brendan reworks the system memory pinning in our driver
>> to better handle different types of memory buffers that are passed into. 
>>
>> Changes Since v1:
>> ----------------
>> Added missing commit messages to patches 1 and 2.
>>
>> ---
>>
>> Patrick Kelsey (3):
>>       IB/hfi1: Fix math bugs in hfi1_can_pin_pages()
>>       IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
>>       IB/hfi1: Do all memory-pinning through hfi1's pinning interface
>>
> 
> <...>
> 
>>  include/uapi/rdma/hfi/hfi1_ioctl.h      |  18 +
>>  include/uapi/rdma/hfi/hfi1_user.h       |  31 +-
>>  include/uapi/rdma/rdma_user_ioctl.h     |   3 +
> 
> Where can we see user-space part of these changes?

These don't effect anything in rdma core if that's the concern.

Pat and Brendan added an IOCTL to get some additional stat information about the
pinned buffers to aid in testing and debugging. The thought was OPX, our
libfabric provider for OPA may want to take advantage of the stats here as well.

-Denny
Jason Gunthorpe Feb. 6, 2023, 3:24 p.m. UTC | #3
On Mon, Feb 06, 2023 at 09:17:56AM -0500, Dennis Dalessandro wrote:
> On 2/6/23 6:03 AM, Leon Romanovsky wrote:
> > On Wed, Jan 25, 2023 at 03:01:33PM -0500, Dennis Dalessandro wrote:
> >> This series from Pat & Brendan reworks the system memory pinning in our driver
> >> to better handle different types of memory buffers that are passed into. 
> >>
> >> Changes Since v1:
> >> ----------------
> >> Added missing commit messages to patches 1 and 2.
> >>
> >> ---
> >>
> >> Patrick Kelsey (3):
> >>       IB/hfi1: Fix math bugs in hfi1_can_pin_pages()
> >>       IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
> >>       IB/hfi1: Do all memory-pinning through hfi1's pinning interface
> >>
> > 
> > <...>
> > 
> >>  include/uapi/rdma/hfi/hfi1_ioctl.h      |  18 +
> >>  include/uapi/rdma/hfi/hfi1_user.h       |  31 +-
> >>  include/uapi/rdma/rdma_user_ioctl.h     |   3 +
> > 
> > Where can we see user-space part of these changes?
> 
> These don't effect anything in rdma core if that's the concern.
> 
> Pat and Brendan added an IOCTL to get some additional stat information about the
> pinned buffers to aid in testing and debugging. The thought was OPX, our
> libfabric provider for OPA may want to take advantage of the stats here as well.

I would prefer you save the uapi bits until you are ready to make an
official PR for libfabric

Jason