mbox series

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

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

Message

Dennis Dalessandro Feb. 16, 2023, 4:56 p.m. UTC
This is a respin on top of the latest rdma/for-next branch
of the series being discussed on the list here:
https://lore.kernel.org/linux-rdma/Y+EbyU4HkGyzPoFO@nvidia.com/T/#ma3d153151adf1dbe2b9800000fa9a01f95a80c1f

We have added fixes lines, and Brendan has discovered a couple code hunks that
do not need to be here in this submission. We have also removed the stats stuff
until the user side code is readily available.

---

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 SDMA memory-pinning through hfi1's pinning interface


 drivers/infiniband/hw/hfi1/Makefile     |   2 +
 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 | 516 ++++++++++++++++++++++++
 drivers/infiniband/hw/hfi1/pinning.c    |  55 +++
 drivers/infiniband/hw/hfi1/pinning.h    |  88 ++++
 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_user.h       |  31 +-
 18 files changed, 918 insertions(+), 478 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

Jason Gunthorpe Feb. 17, 2023, 8:41 p.m. UTC | #1
On Thu, Feb 16, 2023 at 11:56:18AM -0500, Dennis Dalessandro wrote:
> This is a respin on top of the latest rdma/for-next branch
> of the series being discussed on the list here:
> https://lore.kernel.org/linux-rdma/Y+EbyU4HkGyzPoFO@nvidia.com/T/#ma3d153151adf1dbe2b9800000fa9a01f95a80c1f
> 
> We have added fixes lines, and Brendan has discovered a couple code hunks that
> do not need to be here in this submission. We have also removed the stats stuff
> until the user side code is readily available.
> 
> ---
> 
> 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

I took these two

>       IB/hfi1: Do SDMA memory-pinning through hfi1's pinning interface

But really? This is almost a thousand lines in just one patch, is that
really justified? Can you break it up?

Jason
Dennis Dalessandro Feb. 17, 2023, 9:40 p.m. UTC | #2
On 2/17/23 3:41 PM, Jason Gunthorpe wrote:
> On Thu, Feb 16, 2023 at 11:56:18AM -0500, Dennis Dalessandro wrote:
>> This is a respin on top of the latest rdma/for-next branch
>> of the series being discussed on the list here:
>> https://lore.kernel.org/linux-rdma/Y+EbyU4HkGyzPoFO@nvidia.com/T/#ma3d153151adf1dbe2b9800000fa9a01f95a80c1f
>>
>> We have added fixes lines, and Brendan has discovered a couple code hunks that
>> do not need to be here in this submission. We have also removed the stats stuff
>> until the user side code is readily available.
>>
>> ---
>>
>> 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
> 
> I took these two
> 
>>       IB/hfi1: Do SDMA memory-pinning through hfi1's pinning interface
> 
> But really? This is almost a thousand lines in just one patch, is that
> really justified? Can you break it up?

The bulk of the code is moving functions from user_sdma.c and others into a new
file, pin_system.c.

Not sure a bunch of commits "move XZY to pin_system.c" would be very helpful.

To be fair, the patch was posted originally almost 6 weeks ago. In that time no
one has said anything so I don't think there are a bunch of people chomping at
the bit to review this. Any suggestions to make it easier for your review?

-Denny
Jason Gunthorpe Feb. 18, 2023, 3:59 p.m. UTC | #3
On Fri, Feb 17, 2023 at 04:40:32PM -0500, Dennis Dalessandro wrote:
> On 2/17/23 3:41 PM, Jason Gunthorpe wrote:
> > On Thu, Feb 16, 2023 at 11:56:18AM -0500, Dennis Dalessandro wrote:
> >> This is a respin on top of the latest rdma/for-next branch
> >> of the series being discussed on the list here:
> >> https://lore.kernel.org/linux-rdma/Y+EbyU4HkGyzPoFO@nvidia.com/T/#ma3d153151adf1dbe2b9800000fa9a01f95a80c1f
> >>
> >> We have added fixes lines, and Brendan has discovered a couple code hunks that
> >> do not need to be here in this submission. We have also removed the stats stuff
> >> until the user side code is readily available.
> >>
> >> ---
> >>
> >> 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
> > 
> > I took these two
> > 
> >>       IB/hfi1: Do SDMA memory-pinning through hfi1's pinning interface
> > 
> > But really? This is almost a thousand lines in just one patch, is that
> > really justified? Can you break it up?
> 
> The bulk of the code is moving functions from user_sdma.c and others into a new
> file, pin_system.c.
> 
> Not sure a bunch of commits "move XZY to pin_system.c" would be very
> helpful.

One doing code motion would be fine

> To be fair, the patch was posted originally almost 6 weeks ago. In that time no
> one has said anything so I don't think there are a bunch of people chomping at
> the bit to review this. Any suggestions to make it easier for your review?

Linus will look at it, it can't be totally crazy

Jason