<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/rdma/ib_umem.h, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-01-11T00:07:45Z</updated>
<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>
<entry>
<title>IB/mlx5: Add function to read WQE from user-space</title>
<updated>2014-12-16T02:13:35Z</updated>
<author>
<name>Haggai Eran</name>
<email>haggaie@mellanox.com</email>
</author>
<published>2014-12-11T15:04:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c1395a2a8c01e8a919e47d64eb3d23d00e824b8b'/>
<id>urn:sha1:c1395a2a8c01e8a919e47d64eb3d23d00e824b8b</id>
<content type='text'>
Add a helper function mlx5_ib_read_user_wqe to read information from
user-space owned work queues.  The function will be used in a later
patch by the page-fault handling code in mlx5_ib.

Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;

[ Add stub for ib_umem_copy_from() for CONFIG_INFINIBAND_USER_MEM=n
  - Roland ]

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Add umem function to read data from user-space</title>
<updated>2014-12-16T02:13:35Z</updated>
<author>
<name>Haggai Eran</name>
<email>haggaie@mellanox.com</email>
</author>
<published>2014-12-11T15:04:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c5d76f130b286682b64c659eaf6af701e3d79a7b'/>
<id>urn:sha1:c5d76f130b286682b64c659eaf6af701e3d79a7b</id>
<content type='text'>
In some drivers there's a need to read data from a user space area
that was pinned using ib_umem when running from a different process
context.

The ib_umem_copy_from function allows reading data from the physical
pages pinned in the ib_umem struct.

Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Replace ib_umem's offset field with a full address</title>
<updated>2014-12-16T02:13:35Z</updated>
<author>
<name>Haggai Eran</name>
<email>haggaie@mellanox.com</email>
</author>
<published>2014-12-11T15:04:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=406f9e5fa9a7a60b42e676841e39f2d752266814'/>
<id>urn:sha1:406f9e5fa9a7a60b42e676841e39f2d752266814</id>
<content type='text'>
In order to allow umems that do not pin memory, we need the umem to
keep track of its region's address.

This makes the offset field redundant, and so this patch removes it.

Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
</feed>
