mbox

[for-next,V2,00/11] Mellanox mlx5 core and ODP updates 2017-01-01

Message ID 1483349868-11716-1-git-send-email-saeedm@mellanox.com
State Accepted, archived
Delegated to: David Miller
Headers show

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git tags/mlx5-odp-for-4.11

Message

Saeed Mahameed Jan. 2, 2017, 9:37 a.m. UTC
Hi Dave and Doug,

The following eleven patches mainly come from Artemy Kovalyov
who expanded mlx5 on-demand-paging (ODP) support. In addition
there are three cleanup patches which don't change any functionality,
but are needed to align codebase prior accepting other patches.

Memory region (MR) in IB can be huge and ODP (on-demand paging)
technique allows to use unpinned memory, which can be consumed and
released on demand. This allows to applications do not pin down
the underlying physical pages of the address space, and save from them
need to track the validity of the mappings.

Rather, the HCA requests the latest translations from the OS when pages
are not present, and the OS invalidates translations which are no longer
valid due to either non-present pages or mapping changes.

In existing ODP implementation applications is needed to register
memory buffers for communication, though registered memory regions
need not have valid mappings at registration time.

This patch set performs the following steps to expand
current ODP implementation:

1. It refactors UMR to support large regions, by introducing generic
   function to perform HCA translation table modifications. This
   function supports both atomic and process contexts and is not limited
   by number of modified entries.

   This function allows to enable reallocated memory regions of
   arbitrary size, so adding MR cache buckets to support up to 16GB MRs.

2. It changes page fault event format and refactor page faults logic
   together with addition of atomic support.

3. It prepares mlx5 core code to support implicit registration with
   simplified and relaxed semantics.

   Implicit ODP semantics allows to applications provide special memory
   key that represents their complete address space. Thus all IO accesses
   referencing to this key (with proper access rights associated with the key)
   wouldn't need not register any virtual address range.

Thanks,
        Artemy, Ilya and Leon

v1->v2:
  - Don't use 'inline' in .c files

The following changes since commit 7ce7d89f48834cefece7804d38fc5d85382edf77
    Linux 4.10-rc1

are available in the git repository at:
    git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git tags/mlx5-odp-for-4.11

for you to fetch changes up to 4ca4c0713ca3097f1be94355d9a36bd1fc7243a2
    IB/mlx5: Improve MR check

Regards,
Saeed.

Artemy Kovalyov (8):
  net/mlx5: Support new MR features
  IB/mlx5: Refactor UMR post send format
  IB/mlx5: Add support for big MRs
  IB/mlx5: Add MR cache for large UMR regions
  net/mlx5: Update PAGE_FAULT_RESUME layout
  {net,IB}/mlx5: Refactor page fault handling
  IB/mlx5: Add ODP atomics support
  IB/mlx5: Improve MR check

Binoy Jayan (1):
  IB/mlx5: Add helper mlx5_ib_post_send_wait

Leon Romanovsky (1):
  IB/mlx5: Reorder code in query device command

Max Gurtovoy (1):
  net/mlx5: Fix offset naming for reserved fields in hca_cap_bits

 drivers/infiniband/hw/mlx5/main.c                  |  50 +-
 drivers/infiniband/hw/mlx5/mem.c                   |  32 +-
 drivers/infiniband/hw/mlx5/mlx5_ib.h               |  89 ++--
 drivers/infiniband/hw/mlx5/mr.c                    | 518 ++++++++-------------
 drivers/infiniband/hw/mlx5/odp.c                   | 424 ++++++++---------
 drivers/infiniband/hw/mlx5/qp.c                    | 154 ++----
 drivers/net/ethernet/mellanox/mlx5/core/dev.c      |  33 ++
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/eq.c       | 290 ++++++++++--
 drivers/net/ethernet/mellanox/mlx5/core/main.c     |  41 +-
 .../net/ethernet/mellanox/mlx5/core/mlx5_core.h    |   2 +
 drivers/net/ethernet/mellanox/mlx5/core/qp.c       | 114 -----
 include/linux/mlx5/device.h                        |   6 +-
 include/linux/mlx5/driver.h                        | 105 ++++-
 include/linux/mlx5/mlx5_ifc.h                      |  31 +-
 include/linux/mlx5/qp.h                            |  76 ++-
 16 files changed, 1000 insertions(+), 967 deletions(-)

Comments

David Miller Jan. 2, 2017, 8:53 p.m. UTC | #1
From: Saeed Mahameed <saeedm@mellanox.com>
Date: Mon,  2 Jan 2017 11:37:37 +0200

> The following eleven patches mainly come from Artemy Kovalyov
> who expanded mlx5 on-demand-paging (ODP) support. In addition
> there are three cleanup patches which don't change any functionality,
> but are needed to align codebase prior accepting other patches.

Series applied to net-next, thanks.
Saeed Mahameed Jan. 2, 2017, 11:30 p.m. UTC | #2
On Mon, Jan 2, 2017 at 10:53 PM, David Miller <davem@davemloft.net> wrote:
> From: Saeed Mahameed <saeedm@mellanox.com>
> Date: Mon,  2 Jan 2017 11:37:37 +0200
>
>> The following eleven patches mainly come from Artemy Kovalyov
>> who expanded mlx5 on-demand-paging (ODP) support. In addition
>> there are three cleanup patches which don't change any functionality,
>> but are needed to align codebase prior accepting other patches.
>
> Series applied to net-next, thanks.

Whoops,

This series was meant as a pull request, you can blame it on me I
kinda messed up the V2 title.
Doug will have to pull same patches later, will this produce a
conflict on merge window ?

Sorry for the confusion.
Leon Romanovsky Jan. 3, 2017, 7:23 a.m. UTC | #3
On Tue, Jan 03, 2017 at 01:30:16AM +0200, Saeed Mahameed wrote:
> On Mon, Jan 2, 2017 at 10:53 PM, David Miller <davem@davemloft.net> wrote:
> > From: Saeed Mahameed <saeedm@mellanox.com>
> > Date: Mon,  2 Jan 2017 11:37:37 +0200
> >
> >> The following eleven patches mainly come from Artemy Kovalyov
> >> who expanded mlx5 on-demand-paging (ODP) support. In addition
> >> there are three cleanup patches which don't change any functionality,
> >> but are needed to align codebase prior accepting other patches.
> >
> > Series applied to net-next, thanks.
>
> Whoops,
>
> This series was meant as a pull request, you can blame it on me I
> kinda messed up the V2 title.
> Doug will have to pull same patches later, will this produce a
> conflict on merge window ?

Yes, but it can be easily avoided.

Doug,

We have another pull request to send and we will base its code on the
Dave's tree instead of Linus's rc tag. In such way, you will have the
same commits as Dave and won't have merge failures.

Please don't apply manually this specific patchset.

Sorry for the inconvenience.

Thanks.

>
> Sorry for the confusion.
Doug Ledford Jan. 24, 2017, 7:39 p.m. UTC | #4
On Tue, 2017-01-03 at 09:23 +0200, Leon Romanovsky wrote:
> On Tue, Jan 03, 2017 at 01:30:16AM +0200, Saeed Mahameed wrote:
> > 
> > On Mon, Jan 2, 2017 at 10:53 PM, David Miller <davem@davemloft.net>
> > wrote:
> > > 
> > > From: Saeed Mahameed <saeedm@mellanox.com>
> > > Date: Mon,  2 Jan 2017 11:37:37 +0200
> > > 
> > > > 
> > > > The following eleven patches mainly come from Artemy Kovalyov
> > > > who expanded mlx5 on-demand-paging (ODP) support. In addition
> > > > there are three cleanup patches which don't change any
> > > > functionality,
> > > > but are needed to align codebase prior accepting other patches.
> > > 
> > > Series applied to net-next, thanks.
> > 
> > Whoops,
> > 
> > This series was meant as a pull request, you can blame it on me I
> > kinda messed up the V2 title.
> > Doug will have to pull same patches later, will this produce a
> > conflict on merge window ?
> 
> Yes, but it can be easily avoided.
> 
> Doug,
> 
> We have another pull request to send and we will base its code on the
> Dave's tree instead of Linus's rc tag. In such way, you will have the
> same commits as Dave and won't have merge failures.
> 
> Please don't apply manually this specific patchset.
> 
> Sorry for the inconvenience.

Hi Leon and Saeed,

As I understand it, Dave took this series, but I have not.  You were
going to base another pull request on top of this so I could get both.
 However, I believe that was the attempt to reorg the driver pull
request, which David NAKed.  That means I have not picked this up.  Are
all of the other for-next patches you posted against the RDMA list
going to go in cleanly without this series, or should I expect
conflicts between Dave's tree and my own?
Leon Romanovsky Jan. 24, 2017, 7:58 p.m. UTC | #5
On Tue, Jan 24, 2017 at 02:39:59PM -0500, Doug Ledford wrote:
> On Tue, 2017-01-03 at 09:23 +0200, Leon Romanovsky wrote:
> > On Tue, Jan 03, 2017 at 01:30:16AM +0200, Saeed Mahameed wrote:
> > >
> > > On Mon, Jan 2, 2017 at 10:53 PM, David Miller <davem@davemloft.net>
> > > wrote:
> > > >
> > > > From: Saeed Mahameed <saeedm@mellanox.com>
> > > > Date: Mon,  2 Jan 2017 11:37:37 +0200
> > > >
> > > > >
> > > > > The following eleven patches mainly come from Artemy Kovalyov
> > > > > who expanded mlx5 on-demand-paging (ODP) support. In addition
> > > > > there are three cleanup patches which don't change any
> > > > > functionality,
> > > > > but are needed to align codebase prior accepting other patches.
> > > >
> > > > Series applied to net-next, thanks.
> > >
> > > Whoops,
> > >
> > > This series was meant as a pull request, you can blame it on me I
> > > kinda messed up the V2 title.
> > > Doug will have to pull same patches later, will this produce a
> > > conflict on merge window ?
> >
> > Yes, but it can be easily avoided.
> >
> > Doug,
> >
> > We have another pull request to send and we will base its code on the
> > Dave's tree instead of Linus's rc tag. In such way, you will have the
> > same commits as Dave and won't have merge failures.
> >
> > Please don't apply manually this specific patchset.
> >
> > Sorry for the inconvenience.
>
> Hi Leon and Saeed,
>
> As I understand it, Dave took this series, but I have not.  You were
> going to base another pull request on top of this so I could get both.

We did it, ODP was our first pull request and 4K UAR was second one.
http://marc.info/?l=linux-rdma&m=148398855416090&w=2
Dave pulled this tag:
https://git.kernel.org/cgit/linux/kernel/git/mellanox/linux.git/tag/?h=mlx5-4kuar-for-4.11

Since 4K UAR tag was based on ODP, by pulling mlx5-4kuar-for-4.11 tag you
will get ODP too.

>  However, I believe that was the attempt to reorg the driver pull
> request, which David NAKed.  

It was our third pull request
http://marc.info/?l=linux-rdma&m=148424983101796&w=2
https://git.kernel.org/cgit/linux/kernel/git/mellanox/linux.git/tag/?h=mlx5-dir-layout-reorg

> That means I have not picked this up.  Are
> all of the other for-next patches you posted against the RDMA list
> going to go in cleanly without this series, or should I expect
> conflicts between Dave's tree and my own?

All patches sent by me are based on mlx5-4kuar-for-4.11 tag which
exists in Dave's tree and everything will apply cleanly on your
k.o/for-4.11 branch and won't have merge conflicts between your tree and
Dave's net-next tree.

For you convenience, my submission queue can be found at:
https://git.kernel.org/cgit/linux/kernel/git/leon/linux-rdma.git/log/?h=rdma-next

Thanks

>
> --
> Doug Ledford <dledford@redhat.com>
>     GPG KeyID: B826A3330E572FDD
>    
> Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD
Doug Ledford Jan. 24, 2017, 8:57 p.m. UTC | #6
On Tue, 2017-01-24 at 21:58 +0200, Leon Romanovsky wrote:
> On Tue, Jan 24, 2017 at 02:39:59PM -0500, Doug Ledford wrote:
> > 
> > On Tue, 2017-01-03 at 09:23 +0200, Leon Romanovsky wrote:
> > > 
> > > On Tue, Jan 03, 2017 at 01:30:16AM +0200, Saeed Mahameed wrote:
> > > > 
> > > > 
> > > > On Mon, Jan 2, 2017 at 10:53 PM, David Miller <davem@davemloft.
> > > > net>
> > > > wrote:
> > > > > 
> > > > > 
> > > > > From: Saeed Mahameed <saeedm@mellanox.com>
> > > > > Date: Mon,  2 Jan 2017 11:37:37 +0200
> > > > > 
> > > > > > 
> > > > > > 
> > > > > > The following eleven patches mainly come from Artemy
> > > > > > Kovalyov
> > > > > > who expanded mlx5 on-demand-paging (ODP) support. In
> > > > > > addition
> > > > > > there are three cleanup patches which don't change any
> > > > > > functionality,
> > > > > > but are needed to align codebase prior accepting other
> > > > > > patches.
> > > > > 
> > > > > Series applied to net-next, thanks.
> > > > 
> > > > Whoops,
> > > > 
> > > > This series was meant as a pull request, you can blame it on me
> > > > I
> > > > kinda messed up the V2 title.
> > > > Doug will have to pull same patches later, will this produce a
> > > > conflict on merge window ?
> > > 
> > > Yes, but it can be easily avoided.
> > > 
> > > Doug,
> > > 
> > > We have another pull request to send and we will base its code on
> > > the
> > > Dave's tree instead of Linus's rc tag. In such way, you will have
> > > the
> > > same commits as Dave and won't have merge failures.
> > > 
> > > Please don't apply manually this specific patchset.
> > > 
> > > Sorry for the inconvenience.
> > 
> > Hi Leon and Saeed,
> > 
> > As I understand it, Dave took this series, but I have not.  You
> > were
> > going to base another pull request on top of this so I could get
> > both.
> 
> We did it, ODP was our first pull request and 4K UAR was second one.
> http://marc.info/?l=linux-rdma&m=148398855416090&w=2
> Dave pulled this tag:
> https://git.kernel.org/cgit/linux/kernel/git/mellanox/linux.git/tag/?
> h=mlx5-4kuar-for-4.11
> 
> Since 4K UAR tag was based on ODP, by pulling mlx5-4kuar-for-4.11 tag
> you
> will get ODP too.

OK, I've verified that I have it all, thanks.

> > 
> >  However, I believe that was the attempt to reorg the driver pull
> > request, which David NAKed.  
> 
> It was our third pull request
> http://marc.info/?l=linux-rdma&m=148424983101796&w=2
> https://git.kernel.org/cgit/linux/kernel/git/mellanox/linux.git/tag/?
> h=mlx5-dir-layout-reorg
> 
> > 
> > That means I have not picked this up.  Are
> > all of the other for-next patches you posted against the RDMA list
> > going to go in cleanly without this series, or should I expect
> > conflicts between Dave's tree and my own?
> 
> All patches sent by me are based on mlx5-4kuar-for-4.11 tag which
> exists in Dave's tree and everything will apply cleanly on your
> k.o/for-4.11 branch and won't have merge conflicts between your tree
> and
> Dave's net-next tree.
> 
> For you convenience, my submission queue can be found at:
> https://git.kernel.org/cgit/linux/kernel/git/leon/linux-rdma.git/log/
> ?h=rdma-next
> 
> Thanks
> 
> > 
> > 
> > --
> > Doug Ledford <dledford@redhat.com>
> >     GPG KeyID: B826A3330E572FDD
> >    
> > Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57
> > 2FDD
> 
>