mbox series

[rdma-next,0/4] Mark create/destroy address handle calls as atomic/sleepable

Message ID 1544518768-16361-1-git-send-email-galpress@amazon.com (mailing list archive)
Headers show
Series Mark create/destroy address handle calls as atomic/sleepable | expand

Message

Gal Pressman Dec. 11, 2018, 8:59 a.m. UTC
Hi Jason and Doug,
This patchset adds a 'sleepable' flag to create/destroy address handle flows in
order to allow drivers to wait for device completion instead of busy polling
when possible.

Patches #1, #2 add the flag to create/destroy AH callbacks and change all the
drivers, patches #3, #4 change bnxt_re driver to make use of the flag and not
poll for firmware completion.

I had some issues with rdmavt callbacks, it looks like their create_ah function
is not matching the callback signature. Not entirely sure if that's intended or
not so I didn't change it, let me know what you think about that.

Gal Pressman (4):
  RDMA: Mark if create address handle is in a sleepable context
  RDMA: Mark if destroy address handle is in a sleepable context
  RDMA/bnxt_re: Make use of create AH sleepable flag
  RDMA/bnxt_re: Make use of destroy AH sleepable flag

 drivers/infiniband/core/agent.c                 |  4 ++--
 drivers/infiniband/core/cm.c                    |  6 ++---
 drivers/infiniband/core/mad_rmpp.c              | 10 ++++----
 drivers/infiniband/core/sa_query.c              |  4 ++--
 drivers/infiniband/core/user_mad.c              |  4 ++--
 drivers/infiniband/core/uverbs_cmd.c            |  2 +-
 drivers/infiniband/core/uverbs_std_types.c      |  2 +-
 drivers/infiniband/core/verbs.c                 | 21 ++++++++++------
 drivers/infiniband/hw/bnxt_re/ib_verbs.c        | 12 ++++++----
 drivers/infiniband/hw/bnxt_re/ib_verbs.h        |  3 ++-
 drivers/infiniband/hw/bnxt_re/qplib_sp.c        | 10 ++++----
 drivers/infiniband/hw/bnxt_re/qplib_sp.h        |  6 +++--
 drivers/infiniband/hw/hfi1/mad.c                |  2 +-
 drivers/infiniband/hw/hns/hns_roce_ah.c         |  3 ++-
 drivers/infiniband/hw/hns/hns_roce_device.h     |  3 ++-
 drivers/infiniband/hw/mlx4/ah.c                 |  6 ++---
 drivers/infiniband/hw/mlx4/mad.c                | 32 ++++++++++++++-----------
 drivers/infiniband/hw/mlx4/mlx4_ib.h            |  4 ++--
 drivers/infiniband/hw/mlx5/ah.c                 |  4 ++--
 drivers/infiniband/hw/mlx5/mlx5_ib.h            |  4 ++--
 drivers/infiniband/hw/mthca/mthca_mad.c         |  6 ++---
 drivers/infiniband/hw/mthca/mthca_provider.c    |  3 ++-
 drivers/infiniband/hw/ocrdma/ocrdma_ah.c        |  4 ++--
 drivers/infiniband/hw/ocrdma/ocrdma_ah.h        |  4 ++--
 drivers/infiniband/hw/qedr/verbs.c              |  4 ++--
 drivers/infiniband/hw/qedr/verbs.h              |  4 ++--
 drivers/infiniband/hw/qib/qib_mad.c             |  3 ++-
 drivers/infiniband/hw/qib/qib_verbs.c           |  2 +-
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c    |  3 ++-
 drivers/infiniband/hw/usnic/usnic_ib_verbs.h    |  3 ++-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c |  6 +++--
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h |  4 ++--
 drivers/infiniband/sw/rdmavt/mad.c              |  2 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c           |  3 ++-
 drivers/infiniband/ulp/ipoib/ipoib_ib.c         |  4 ++--
 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c |  8 +++----
 drivers/infiniband/ulp/srpt/ib_srpt.c           |  4 ++--
 include/rdma/ib_verbs.h                         | 11 ++++++---
 38 files changed, 126 insertions(+), 94 deletions(-)

Comments

Gal Pressman Dec. 11, 2018, 12:32 p.m. UTC | #1
On 11-Dec-18 14:12, Majd Dibbiny wrote:
> 
> On Dec 11, 2018, at 10:59 AM, Gal Pressman <galpress@amazon.com<mailto:galpress@amazon.com>> wrote:
> 
> Hi Jason and Doug,
> This patchset adds a 'sleepable' flag to create/destroy address handle flows in
> order to allow drivers to wait for device completion instead of busy polling
> when possible.
> 
> Patches #1, #2 add the flag to create/destroy AH callbacks and change all the
> drivers, patches #3, #4 change bnxt_re driver to make use of the flag and not
> poll for firmware completion.
> 
> I had some issues with rdmavt callbacks, it looks like their create_ah function
> is not matching the callback signature. Not entirely sure if that's intended or
> not so I didn't change it, let me know what you think about that.
> Probably you need to rebase on top of Kamal’s following patch:
> 
> [PATCH rdma-next v5 01/20] RDMA/rdmavt: Fix rvt_create_ah function signature

Thanks Majd, Jason/Doug do you want me to rebase on top of this patch/patchset
and send a v2?

> 
> Gal Pressman (4):
>  RDMA: Mark if create address handle is in a sleepable context
>  RDMA: Mark if destroy address handle is in a sleepable context
>  RDMA/bnxt_re: Make use of create AH sleepable flag
>  RDMA/bnxt_re: Make use of destroy AH sleepable flag
> 
> drivers/infiniband/core/agent.c                 |  4 ++--
> drivers/infiniband/core/cm.c                    |  6 ++---
> drivers/infiniband/core/mad_rmpp.c              | 10 ++++----
> drivers/infiniband/core/sa_query.c              |  4 ++--
> drivers/infiniband/core/user_mad.c              |  4 ++--
> drivers/infiniband/core/uverbs_cmd.c            |  2 +-
> drivers/infiniband/core/uverbs_std_types.c      |  2 +-
> drivers/infiniband/core/verbs.c                 | 21 ++++++++++------
> drivers/infiniband/hw/bnxt_re/ib_verbs.c        | 12 ++++++----
> drivers/infiniband/hw/bnxt_re/ib_verbs.h        |  3 ++-
> drivers/infiniband/hw/bnxt_re/qplib_sp.c        | 10 ++++----
> drivers/infiniband/hw/bnxt_re/qplib_sp.h        |  6 +++--
> drivers/infiniband/hw/hfi1/mad.c                |  2 +-
> drivers/infiniband/hw/hns/hns_roce_ah.c         |  3 ++-
> drivers/infiniband/hw/hns/hns_roce_device.h     |  3 ++-
> drivers/infiniband/hw/mlx4/ah.c                 |  6 ++---
> drivers/infiniband/hw/mlx4/mad.c                | 32 ++++++++++++++-----------
> drivers/infiniband/hw/mlx4/mlx4_ib.h            |  4 ++--
> drivers/infiniband/hw/mlx5/ah.c                 |  4 ++--
> drivers/infiniband/hw/mlx5/mlx5_ib.h            |  4 ++--
> drivers/infiniband/hw/mthca/mthca_mad.c         |  6 ++---
> drivers/infiniband/hw/mthca/mthca_provider.c    |  3 ++-
> drivers/infiniband/hw/ocrdma/ocrdma_ah.c        |  4 ++--
> drivers/infiniband/hw/ocrdma/ocrdma_ah.h        |  4 ++--
> drivers/infiniband/hw/qedr/verbs.c              |  4 ++--
> drivers/infiniband/hw/qedr/verbs.h              |  4 ++--
> drivers/infiniband/hw/qib/qib_mad.c             |  3 ++-
> drivers/infiniband/hw/qib/qib_verbs.c           |  2 +-
> drivers/infiniband/hw/usnic/usnic_ib_verbs.c    |  3 ++-
> drivers/infiniband/hw/usnic/usnic_ib_verbs.h    |  3 ++-
> drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c |  6 +++--
> drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h |  4 ++--
> drivers/infiniband/sw/rdmavt/mad.c              |  2 +-
> drivers/infiniband/sw/rxe/rxe_verbs.c           |  3 ++-
> drivers/infiniband/ulp/ipoib/ipoib_ib.c         |  4 ++--
> drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c |  8 +++----
> drivers/infiniband/ulp/srpt/ib_srpt.c           |  4 ++--
> include/rdma/ib_verbs.h                         | 11 ++++++---
> 38 files changed, 126 insertions(+), 94 deletions(-)
> 
> --
> 2.7.4
>
Jason Gunthorpe Dec. 11, 2018, 4:12 p.m. UTC | #2
On Tue, Dec 11, 2018 at 10:59:24AM +0200, Gal Pressman wrote:
> Hi Jason and Doug,
> This patchset adds a 'sleepable' flag to create/destroy address handle flows in
> order to allow drivers to wait for device completion instead of busy polling
> when possible.
> 
> Patches #1, #2 add the flag to create/destroy AH callbacks and change all the
> drivers, patches #3, #4 change bnxt_re driver to make use of the flag and not
> poll for firmware completion.
> 
> I had some issues with rdmavt callbacks, it looks like their create_ah function
> is not matching the callback signature. Not entirely sure if that's intended or
> not so I didn't change it, let me know what you think about that.

Kamal discovered this too, it is fixed in -rc, send your patches
against a branch with -rc merged in to for-next...

Jason
Gal Pressman Dec. 11, 2018, 4:21 p.m. UTC | #3
On 11-Dec-18 18:12, Jason Gunthorpe wrote:
> On Tue, Dec 11, 2018 at 10:59:24AM +0200, Gal Pressman wrote:
>> Hi Jason and Doug,
>> This patchset adds a 'sleepable' flag to create/destroy address handle flows in
>> order to allow drivers to wait for device completion instead of busy polling
>> when possible.
>>
>> Patches #1, #2 add the flag to create/destroy AH callbacks and change all the
>> drivers, patches #3, #4 change bnxt_re driver to make use of the flag and not
>> poll for firmware completion.
>>
>> I had some issues with rdmavt callbacks, it looks like their create_ah function
>> is not matching the callback signature. Not entirely sure if that's intended or
>> not so I didn't change it, let me know what you think about that.
> 
> Kamal discovered this too, it is fixed in -rc, send your patches
> against a branch with -rc merged in to for-next...
> 
> Jason
> 

Thanks, will send as v2 soon.