<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/include/rdma/ib_umem_odp.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-05-12T10:06:51Z</updated>
<entry>
<title>RDMA/core: Convert UMEM ODP DMA mapping to caching IOVA and page linkage</title>
<updated>2025-05-12T10:06:51Z</updated>
<author>
<name>Leon Romanovsky</name>
</author>
<published>2025-04-28T09:22:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1efe8c0670d6a6883faa09c9abc746c741f5664a'/>
<id>urn:sha1:1efe8c0670d6a6883faa09c9abc746c741f5664a</id>
<content type='text'>
Reuse newly added DMA API to cache IOVA and only link/unlink pages
in fast path for UMEM ODP flow.

Tested-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
</content>
</entry>
<entry>
<title>RDMA/umem: Store ODP access mask information in PFN</title>
<updated>2025-05-12T10:06:46Z</updated>
<author>
<name>Leon Romanovsky</name>
</author>
<published>2025-04-28T09:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eedd5b1276e76d6b260a7a77a149ef5155aa76f0'/>
<id>urn:sha1:eedd5b1276e76d6b260a7a77a149ef5155aa76f0</id>
<content type='text'>
As a preparation to remove dma_list, store access mask in PFN pointer
and not in dma_addr_t.

Tested-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Enable ODP sync without faulting</title>
<updated>2020-10-01T19:44:05Z</updated>
<author>
<name>Yishai Hadas</name>
</author>
<published>2020-09-30T16:38:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bfafde08693cc2e740134c3e32b40254f5d82ae'/>
<id>urn:sha1:8bfafde08693cc2e740134c3e32b40254f5d82ae</id>
<content type='text'>
Enable ODP sync without faulting, this improves performance by reducing
the number of page faults in the system.

The gain from this option is that the device page table can be aligned
with the presented pages in the CPU page table without causing page
faults.

As of that, the overhead on data path from hardware point of view to
trigger a fault which end-up by calling the driver to bring the pages
will be dropped.

Link: https://lore.kernel.org/r/20200930163828.1336747-3-leon@kernel.org
Signed-off-by: Yishai Hadas &lt;yishaih@nvidia.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Improve ODP to use hmm_range_fault()</title>
<updated>2020-10-01T19:39:54Z</updated>
<author>
<name>Yishai Hadas</name>
</author>
<published>2020-09-30T16:38:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36f30e486dce22345c2dd3a3ba439c12cd67f6ba'/>
<id>urn:sha1:36f30e486dce22345c2dd3a3ba439c12cd67f6ba</id>
<content type='text'>
Move to use hmm_range_fault() instead of get_user_pags_remote() to improve
performance in a few aspects:

This includes:
- Dropping the need to allocate and free memory to hold its output

- No need any more to use put_page() to unpin the pages

- The logic to detect contiguous pages is done based on the returned
  order, no need to run per page and evaluate.

In addition, moving to use hmm_range_fault() enables to reduce page faults
in the system with it's snapshot mode, this will be introduced in next
patches from this series.

As part of this, cleanup some flows and use the required data structures
to work with hmm_range_fault().

Link: https://lore.kernel.org/r/20200930163828.1336747-2-leon@kernel.org
Signed-off-by: Yishai Hadas &lt;yishaih@nvidia.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>RDMA/include: Replace license text with SPDX tags</title>
<updated>2020-07-29T17:48:36Z</updated>
<author>
<name>Leon Romanovsky</name>
</author>
<published>2020-07-19T07:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6bf9d8f6f0df3f7aa852dc111c960bc04578c7c5'/>
<id>urn:sha1:6bf9d8f6f0df3f7aa852dc111c960bc04578c7c5</id>
<content type='text'>
The header files in RDMA subsystem are dual licensed and can be
described by simple SPDX tag, so replace all of them at once
together with making them use the same coding style for header
guard defines.

Link: https://lore.kernel.org/r/20200719072521.135260-1-leon@kernel.org
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
</content>
</entry>
<entry>
<title>IB: Allow calls to ib_umem_get from kernel ULPs</title>
<updated>2020-01-16T14:14:28Z</updated>
<author>
<name>Moni Shoua</name>
</author>
<published>2020-01-15T12:43:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c320e527e1548305f31d95ec405140b04aed25f5'/>
<id>urn:sha1:c320e527e1548305f31d95ec405140b04aed25f5</id>
<content type='text'>
So far the assumption was that ib_umem_get() and ib_umem_odp_get()
are called from flows that start in UVERBS and therefore has a user
context. This assumption restricts flows that are initiated by ULPs
and need the service that ib_umem_get() provides.

This patch changes ib_umem_get() and ib_umem_odp_get() to get IB device
directly by relying on the fact that both UVERBS and ULPs sets that
field correctly.

Reviewed-by: Guy Levi &lt;guyle@mellanox.com&gt;
Signed-off-by: Moni Shoua &lt;monis@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
</content>
</entry>
<entry>
<title>RDMA/odp: Use mmu_interval_notifier_insert()</title>
<updated>2019-11-23T23:56:44Z</updated>
<author>
<name>Jason Gunthorpe</name>
</author>
<published>2019-11-12T20:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f25a546e65292b36f15cca0912450c4944fae031'/>
<id>urn:sha1:f25a546e65292b36f15cca0912450c4944fae031</id>
<content type='text'>
Replace the internal interval tree based mmu notifier with the new common
mmu_interval_notifier_insert() API. This removes a lot of code and fixes a
deadlock that can be triggered in ODP:

 zap_page_range()
  mmu_notifier_invalidate_range_start()
   [..]
    ib_umem_notifier_invalidate_range_start()
       down_read(&amp;per_mm-&gt;umem_rwsem)
  unmap_single_vma()
    [..]
      __split_huge_page_pmd()
        mmu_notifier_invalidate_range_start()
        [..]
           ib_umem_notifier_invalidate_range_start()
              down_read(&amp;per_mm-&gt;umem_rwsem)   // DEADLOCK

        mmu_notifier_invalidate_range_end()
           up_read(&amp;per_mm-&gt;umem_rwsem)
  mmu_notifier_invalidate_range_end()
     up_read(&amp;per_mm-&gt;umem_rwsem)

The umem_rwsem is held across the range_start/end as the ODP algorithm for
invalidate_range_end cannot tolerate changes to the interval
tree. However, due to the nested invalidation regions the second
down_read() can deadlock if there are competing writers. The new core code
provides an alternative scheme to solve this problem.

Fixes: ca748c39ea3f ("RDMA/umem: Get rid of per_mm-&gt;notifier_count")
Link: https://lore.kernel.org/r/20191112202231.3856-6-jgg@ziepe.ca
Tested-by: Artemy Kovalyov &lt;artemyko@mellanox.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>RDMA/mlx5: Rework implicit ODP destroy</title>
<updated>2019-10-28T19:41:14Z</updated>
<author>
<name>Jason Gunthorpe</name>
</author>
<published>2019-10-09T16:09:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5256edcb98a14b11409a2d323f56a70a8b366363'/>
<id>urn:sha1:5256edcb98a14b11409a2d323f56a70a8b366363</id>
<content type='text'>
Use SRCU in a sensible way by removing all MRs in the implicit tree from
the two xarrays (the update operation), then a synchronize, followed by a
normal single threaded teardown.

This is only a little unusual from the normal pattern as there can still
be some work pending in the unbound wq that may also require a workqueue
flush. This is tracked with a single atomic, consolidating the redundant
existing atomics and wait queue.

For understand-ability the entire ODP implicit create/destroy flow now
largely exists in a single pair of functions within odp.c, with a few
support functions for tearing down an unused child.

Link: https://lore.kernel.org/r/20191009160934.3143-13-jgg@ziepe.ca
Reviewed-by: Artemy Kovalyov &lt;artemyko@mellanox.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>RDMA/mlx5: Use an xarray for the children of an implicit ODP</title>
<updated>2019-10-28T19:41:14Z</updated>
<author>
<name>Jason Gunthorpe</name>
</author>
<published>2019-10-09T16:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=423f52d65005e8f5067d94bd4f41d8a7d8388135'/>
<id>urn:sha1:423f52d65005e8f5067d94bd4f41d8a7d8388135</id>
<content type='text'>
Currently the child leaves are stored in the shared interval tree and
every lookup for a child must be done under the interval tree rwsem.

This is further complicated by dropping the rwsem during iteration (ie the
odp_lookup(), odp_next() pattern), which requires a very tricky an
difficult to understand locking scheme with SRCU.

Instead reserve the interval tree for the exclusive use of the mmu
notifier related code in umem_odp.c and give each implicit MR a xarray
containing all the child MRs.

Since the size of each child is 1GB of VA, a 1 level xarray will index 64G
of VA, and a 2 level will index 2TB, making xarray a much better
data structure choice than an interval tree.

The locking properties of xarray will be used in the next patches to
rework the implicit ODP locking scheme into something simpler.

At this point, the xarray is locked by the implicit MR's umem_mutex, and
read can also be locked by the odp_srcu.

Link: https://lore.kernel.org/r/20191009160934.3143-10-jgg@ziepe.ca
Reviewed-by: Artemy Kovalyov &lt;artemyko@mellanox.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>RDMA/odp: use mmu_notifier_get/put for 'struct ib_ucontext_per_mm'</title>
<updated>2019-08-21T23:58:18Z</updated>
<author>
<name>Jason Gunthorpe</name>
</author>
<published>2019-08-06T23:15:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c571feca2dc972dc5afeba9036d08239f1c51af1'/>
<id>urn:sha1:c571feca2dc972dc5afeba9036d08239f1c51af1</id>
<content type='text'>
This is a significant simplification, no extra list is kept per FD, and
the interval tree is now shared between all the ucontexts, reducing
overhead if there are multiple ucontexts active.

Link: https://lore.kernel.org/r/20190806231548.25242-7-jgg@ziepe.ca
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
</feed>
