<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/rdma/ib_umem.h, branch linux-5.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-05-06T16:08:11Z</updated>
<entry>
<title>RDMA/umem: Remove hugetlb flag</title>
<updated>2019-05-06T16:08:11Z</updated>
<author>
<name>Shiraz Saleem</name>
<email>shiraz.saleem@intel.com</email>
</author>
<published>2019-05-06T13:53:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=db6c6774af0d4861a7c5181ecc3c9ac320de46d9'/>
<id>urn:sha1:db6c6774af0d4861a7c5181ecc3c9ac320de46d9</id>
<content type='text'>
The drivers i40iw and bnxt_re no longer dependent on the hugetlb flag. So
remove this flag from ib_umem structure.

Reviewed-by: Michael J. Ruhl &lt;michael.j.ruhl@intel.com&gt;
Signed-off-by: Shiraz Saleem &lt;shiraz.saleem@intel.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>RDMA/umem: Add API to find best driver supported page size in an MR</title>
<updated>2019-05-06T16:08:11Z</updated>
<author>
<name>Shiraz Saleem</name>
<email>shiraz.saleem@intel.com</email>
</author>
<published>2019-05-06T13:53:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4a35339958f16d42a4ca06a8da9d4b5ab39ee8ea'/>
<id>urn:sha1:4a35339958f16d42a4ca06a8da9d4b5ab39ee8ea</id>
<content type='text'>
This helper iterates through the SG list to find the best page size to use
from a bitmap of HW supported page sizes. Drivers that support multiple
page sizes, but not mixed sizes in an MR can use this API.

Suggested-by: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Signed-off-by: Shiraz Saleem &lt;shiraz.saleem@intel.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>RDMA/umem: Combine contiguous PAGE_SIZE regions in SGEs</title>
<updated>2019-04-08T16:05:24Z</updated>
<author>
<name>Shiraz Saleem</name>
<email>shiraz.saleem@intel.com</email>
</author>
<published>2019-04-02T19:52:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d10bcf947a3ea240351a8182d71e4aa9c8ddba56'/>
<id>urn:sha1:d10bcf947a3ea240351a8182d71e4aa9c8ddba56</id>
<content type='text'>
Combine contiguous regions of PAGE_SIZE pages into single scatter list
entry while building the scatter table for a umem. This minimizes the
number of the entries in the scatter list and reduces the DMA mapping
overhead, particularly with the IOMMU.

Set default max_seg_size in core for IB devices to 2G and do not combine
if we exceed this limit.

Also, purge npages in struct ib_umem as we now DMA map the umem SGL with
sg_nents and npage computation is not needed. Drivers should now be using
ib_umem_num_pages(), so fix the last stragglers.

Move npages tracking to ib_umem_odp as ODP drivers still need it.

Suggested-by: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Reviewed-by: Michael J. Ruhl &lt;michael.j.ruhl@intel.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Acked-by: Adit Ranadive &lt;aditr@vmware.com&gt;
Signed-off-by: Shiraz Saleem &lt;shiraz.saleem@intel.com&gt;
Tested-by: Gal Pressman &lt;galpress@amazon.com&gt;
Tested-by: Selvin Xavier &lt;selvin.xavier@broadcom.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>IB/{core,hw}: Have ib_umem_get extract the ib_ucontext from ib_udata</title>
<updated>2019-01-11T00:07:45Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgg@mellanox.com</email>
</author>
<published>2019-01-09T09:15:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b0ea0fa5435f9df7213a9af098558f7dd584d8e8'/>
<id>urn:sha1:b0ea0fa5435f9df7213a9af098558f7dd584d8e8</id>
<content type='text'>
ib_umem_get() can only be called in a method callback, which always has a
udata parameter. This allows ib_umem_get() to derive the ucontext pointer
directly from the udata without requiring the drivers to find it in some
way or another.

Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
Signed-off-by: Shamir Rabinovitch &lt;shamir.rabinovitch@oracle.com&gt;
</content>
</entry>
<entry>
<title>RDMA/umem: Get rid of struct ib_umem.odp_data</title>
<updated>2018-09-21T15:54:46Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgg@mellanox.com</email>
</author>
<published>2018-09-16T17:48:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=597ecc5a095406a668e53ab330495ddb65327f77'/>
<id>urn:sha1:597ecc5a095406a668e53ab330495ddb65327f77</id>
<content type='text'>
This no longer has any use, we can use container_of to get to the
umem_odp, and a simple flag to indicate if this is an odp MR. Remove the
few remaining references to it.

Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>RDMA/umem: Do not use current-&gt;tgid to track the mm_struct</title>
<updated>2018-09-20T20:19:30Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgg@mellanox.com</email>
</author>
<published>2018-09-16T17:44:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d4b4dd1b9706e48c370f88d3adfe713e43423cc9'/>
<id>urn:sha1:d4b4dd1b9706e48c370f88d3adfe713e43423cc9</id>
<content type='text'>
This is just wrong, the process that calls into the reg_mr is the process
associated with the umem, and that does not have to be the same process
that created the context.

When this code was first written mmgrab() didn't exist, however these days
we can just directly hold the mm_struct pointer in the umem and have no
ambiguity when it comes to releasing the umem as to which mm it was
associated with.

Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/umem: Use the correct mm during ib_umem_release</title>
<updated>2018-05-15T23:09:10Z</updated>
<author>
<name>Lidong Chen</name>
<email>jemmy858585@gmail.com</email>
</author>
<published>2018-05-08T08:50:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8e907ed4882714fd13cfe670681fc6cb5284c780'/>
<id>urn:sha1:8e907ed4882714fd13cfe670681fc6cb5284c780</id>
<content type='text'>
User-space may invoke ibv_reg_mr and ibv_dereg_mr in different threads.

If ibv_dereg_mr is called after the thread which invoked ibv_reg_mr has
exited, get_pid_task will return NULL and ib_umem_release will not
decrease mm-&gt;pinned_vm.

Instead of using threads to locate the mm, use the overall tgid from the
ib_ucontext struct instead. This matches the behavior of ODP and
disassociate in handling the mm of the process that called ibv_reg_mr.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 87773dd56d54 ("IB: ib_umem_release() should decrement mm-&gt;pinned_vm from ib_umem_get")
Signed-off-by: Lidong Chen &lt;lidongchen@tencent.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>IB/umem: Add contiguous ODP support</title>
<updated>2017-04-25T19:40:28Z</updated>
<author>
<name>Artemy Kovalyov</name>
<email>artemyko@mellanox.com</email>
</author>
<published>2017-04-05T06:23:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=403cd12e2cf759ead5cbdcb62bf9872b9618d400'/>
<id>urn:sha1:403cd12e2cf759ead5cbdcb62bf9872b9618d400</id>
<content type='text'>
Currenlty ODP supports only regular MMU pages.
Add ODP support for regions consisting of physically contiguous chunks
of arbitrary order (huge pages for instance) to improve performance.

Signed-off-by: Artemy Kovalyov &lt;artemyko@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB: Replace ib_umem page_size by page_shift</title>
<updated>2017-04-25T19:40:28Z</updated>
<author>
<name>Artemy Kovalyov</name>
<email>artemyko@mellanox.com</email>
</author>
<published>2017-04-05T06:23:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3e7e1193e28a1428e857f3f44870ec2dbd615e6a'/>
<id>urn:sha1:3e7e1193e28a1428e857f3f44870ec2dbd615e6a</id>
<content type='text'>
Size of pages are held by struct ib_umem in page_size field.

It is better to store it as an exponent, because page size by nature
is always power-of-two and used as a factor, divisor or ilog2's argument.

The conversion of page_size to be page_shift allows to have portable
code and avoid following error while compiling on ARM:

  ERROR: "__aeabi_uldivmod" [drivers/infiniband/core/ib_core.ko] undefined!

CC: Selvin Xavier &lt;selvin.xavier@broadcom.com&gt;
CC: Steve Wise &lt;swise@chelsio.com&gt;
CC: Lijun Ou &lt;oulijun@huawei.com&gt;
CC: Shiraz Saleem &lt;shiraz.saleem@intel.com&gt;
CC: Adit Ranadive &lt;aditr@vmware.com&gt;
CC: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
CC: Ram Amrani &lt;Ram.Amrani@Cavium.com&gt;
Signed-off-by: Artemy Kovalyov &lt;artemyko@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Acked-by: Ram Amrani &lt;Ram.Amrani@cavium.com&gt;
Acked-by: Shiraz Saleem &lt;shiraz.saleem@intel.com&gt;
Acked-by: Selvin Xavier &lt;selvin.xavier@broadcom.com&gt;
Acked-by: Selvin Xavier &lt;selvin.xavier@broadcom.com&gt;
Acked-by: Adit Ranadive &lt;aditr@vmware.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Add support for on demand paging regions</title>
<updated>2014-12-16T02:13:36Z</updated>
<author>
<name>Shachar Raindel</name>
<email>raindel@mellanox.com</email>
</author>
<published>2014-12-11T15:04:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8ada2c1c0c1d75a60723cd2ca7d49c594a146af6'/>
<id>urn:sha1:8ada2c1c0c1d75a60723cd2ca7d49c594a146af6</id>
<content type='text'>
* Extend the umem struct to keep the ODP related data.
* Allocate and initialize the ODP related information in the umem
  (page_list, dma_list) and freeing as needed in the end of the run.
* Store a reference to the process PID struct in the ucontext.  Used to
  safely obtain the task_struct and the mm during fault handling,
  without preventing the task destruction if needed.
* Add 2 helper functions: ib_umem_odp_map_dma_pages and
  ib_umem_odp_unmap_dma_pages. These functions get the DMA addresses
  of specific pages of the umem (and, currently, pin them).
* Support for page faults only - IB core will keep the reference on
  the pages used and call put_page when freeing an ODP umem
  area. Invalidations support will be added in a later patch.

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Shachar Raindel &lt;raindel@mellanox.com&gt;
Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Majd Dibbiny &lt;majd@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
</feed>
