Re: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf

2025-03-04 Thread Leon Romanovsky
On Tue, Mar 04, 2025 at 03:29:42PM +0100, Christian König wrote: > Am 26.02.25 um 14:38 schrieb Jason Gunthorpe: > > On Wed, Feb 26, 2025 at 07:55:07AM +, Kasireddy, Vivek wrote: > > > >>> Is there any update or ETA for the v3? Are there any ways we can help? > >> I believe Leon's series is ver

Re: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf

2025-02-26 Thread Leon Romanovsky
On Wed, Feb 26, 2025 at 09:38:22AM -0400, Jason Gunthorpe wrote: > On Wed, Feb 26, 2025 at 07:55:07AM +, Kasireddy, Vivek wrote: > > > > Is there any update or ETA for the v3? Are there any ways we can help? > > > I believe Leon's series is very close to getting merged. Once it > > lands, thi

Re: [RFC PATCH 01/12] dma-buf: Introduce dma_buf_get_pfn_unlocked() kAPI

2025-01-09 Thread Leon Romanovsky
On Thu, Jan 09, 2025 at 10:10:01AM +0100, Christian König wrote: > Am 08.01.25 um 17:22 schrieb Jason Gunthorpe: > > [SNIP] > > > > For P2P cases we are going toward (PFN + P2P source information) as > > > > input to the DMA API. The additional "P2P source information" provides > > > > a good way f

Re: (subset) [PATCH rdma-next 0/8] Introducing Multi-Path DMA Support for mlx5 RDMA Driver

2024-08-08 Thread Leon Romanovsky
On Thu, 01 Aug 2024 15:05:09 +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > From Yishai, > > Overview > > This patch series aims to enable multi-path DMA support, allowing an > mlx5 RDMA device to issue DMA commands through multiple paths. This &

[PATCH rdma-next 6/8] RDMA: Pass uverbs_attr_bundle as part of '.reg_user_mr_dmabuf' API

2024-08-01 Thread Leon Romanovsky
shai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/uverbs_std_types_mr.c | 2 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 3 ++- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 2 +- drivers/infiniband/hw/efa/efa.h | 2 +- drivers/infiniband/hw/efa/efa_verbs.c

[PATCH rdma-next 8/8] RDMA/mlx5: Introduce GET_DATA_DIRECT_SYSFS_PATH ioctl

2024-08-01 Thread Leon Romanovsky
From: Yishai Hadas Introduce the 'GET_DATA_DIRECT_SYSFS_PATH' ioctl to return the sysfs path of the affiliated 'data direct' device for a given device. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx

[PATCH rdma-next 7/8] RDMA/mlx5: Add support for DMABUF MR registrations with Data-direct

2024-08-01 Thread Leon Romanovsky
Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c | 11 + drivers/infiniband/hw/mlx5/mlx5_ib.h | 8 + drivers/infiniband/hw/mlx5/mr.c | 304 +++--- drivers/infiniband/hw/mlx5/odp.c | 5 +- drivers/infi

[PATCH rdma-next 2/8] RDMA/mlx5: Introduce the 'data direct' driver

2024-08-01 Thread Leon Romanovsky
them to clean up the resources that were mmaped with its DMA device. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/Makefile | 1 + drivers/infiniband/hw/mlx5/data_direct.c | 227 +++ drivers/infiniband/hw/mlx5/data_direct.

[PATCH rdma-next 4/8] RDMA/umem: Add support for creating pinned DMABUF umem with a given dma device

2024-08-01 Thread Leon Romanovsky
From: Yishai Hadas Add support for creating pinned DMABUF umem with a specified DMA device instead of the DMA device of the given IB device. This API will be utilized in the upcoming patches of the series when multiple path DMAs are implemented. Signed-off-by: Yishai Hadas Signed-off-by: Leon

[PATCH rdma-next 5/8] RDMA/umem: Introduce an option to revoke DMABUF umem

2024-08-01 Thread Leon Romanovsky
patches in the series, where we aim to delay umem deallocation until the mkey deregistration. However, we must unmap its pages immediately. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/umem_dmabuf.c | 21 +++-- include/rdma/ib_umem.h

[PATCH rdma-next 3/8] RDMA/mlx5: Add the initialization flow to utilize the 'data direct' device

2024-08-01 Thread Leon Romanovsky
g MR registrations that request the data direct functionality. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/cmd.c | 21 +++ drivers/infiniband/hw/mlx5/cmd.h | 2 + drivers/infiniband/hw/mlx5/main.c| 90 ++

[PATCH mlx5-next 1/8] net/mlx5: Add IFC related stuff for data direct

2024-08-01 Thread Leon Romanovsky
From: Yishai Hadas Add IFC related stuff for data direct. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- include/linux/mlx5/mlx5_ifc.h | 51 +++ 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/include/linux/mlx5/mlx5_ifc.h b

[PATCH rdma-next 0/8] Introducing Multi-Path DMA Support for mlx5 RDMA Driver

2024-08-01 Thread Leon Romanovsky
From: Leon Romanovsky >From Yishai, Overview This patch series aims to enable multi-path DMA support, allowing an mlx5 RDMA device to issue DMA commands through multiple paths. This feature is critical for improving performance and reaching line rate in certain environments wh

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-07-18 Thread Leon Romanovsky
On Thu, Jul 18, 2024 at 06:54:17AM +, Omer Shpigelman wrote: > On 7/17/24 15:33, Leon Romanovsky wrote: > > On Wed, Jul 17, 2024 at 10:51:03AM +, Omer Shpigelman wrote: > >> On 7/17/24 10:36, Leon Romanovsky wrote: > >>> On Wed, Jul 17, 2024 at 07:08:59A

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-07-17 Thread Leon Romanovsky
On Wed, Jul 17, 2024 at 10:51:03AM +, Omer Shpigelman wrote: > On 7/17/24 10:36, Leon Romanovsky wrote: > > On Wed, Jul 17, 2024 at 07:08:59AM +, Omer Shpigelman wrote: > >> On 7/16/24 16:40, Jason Gunthorpe wrote: > >>> On Sun, Jul 14, 2024 at 10:18:12A

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-07-17 Thread Leon Romanovsky
On Wed, Jul 17, 2024 at 07:08:59AM +, Omer Shpigelman wrote: > On 7/16/24 16:40, Jason Gunthorpe wrote: > > On Sun, Jul 14, 2024 at 10:18:12AM +, Omer Shpigelman wrote: > >> On 7/12/24 16:08, Jason Gunthorpe wrote: > >>> [You don't often get email from j...@ziepe.ca. Learn why this is > >>

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-07-01 Thread Leon Romanovsky
On Mon, Jul 01, 2024 at 10:46:48AM +, Omer Shpigelman wrote: > On 6/30/24 16:29, Leon Romanovsky wrote: > > On Fri, Jun 28, 2024 at 10:24:32AM +, Omer Shpigelman wrote: > >> On 6/19/24 13:52, Leon Romanovsky wrote: > >>> On Wed, Jun 19, 2024 at 09:27:54A

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-06-30 Thread Leon Romanovsky
On Fri, Jun 28, 2024 at 10:24:32AM +, Omer Shpigelman wrote: > On 6/19/24 13:52, Leon Romanovsky wrote: > > On Wed, Jun 19, 2024 at 09:27:54AM +, Omer Shpigelman wrote: > >> On 6/18/24 15:58, Leon Romanovsky wrote: > >>> On Tue, Jun 18, 2024 at 11:08:34A

Re: [PATCH v2 3/3] vfio/pci: Allow MMIO regions to be exported through dma-buf

2024-06-24 Thread Leon Romanovsky
On Sun, Jun 23, 2024 at 11:53:11PM -0700, Vivek Kasireddy wrote: > From Jason Gunthorpe: > "dma-buf has become a way to safely acquire a handle to non-struct page > memory that can still have lifetime controlled by the exporter. Notably > RDMA can now import dma-buf FDs and build them into MRs whic

Re: [PATCH 06/15] net: hbl_cn: debugfs support

2024-06-24 Thread Leon Romanovsky
On Sun, Jun 23, 2024 at 05:02:44PM +0200, Andrew Lunn wrote: > > > If there is no netdev, what is the point of putting it into loopback? > > > How do you send packets which are to be looped back? How do you > > > receive them to see if they were actually looped back? > > > > > > Andrew > > > >

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-06-24 Thread Leon Romanovsky
On Mon, Jun 24, 2024 at 08:47:41AM +, Omer Shpigelman wrote: > On 6/19/24 13:52, Leon Romanovsky wrote: > > On Wed, Jun 19, 2024 at 09:27:54AM +, Omer Shpigelman wrote: > >> On 6/18/24 15:58, Leon Romanovsky wrote: > >>> On Tue, Jun 18, 2024 at 11:08:34A

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-06-19 Thread Leon Romanovsky
On Wed, Jun 19, 2024 at 09:27:54AM +, Omer Shpigelman wrote: > On 6/18/24 15:58, Leon Romanovsky wrote: > > On Tue, Jun 18, 2024 at 11:08:34AM +, Omer Shpigelman wrote: > >> On 6/17/24 22:04, Leon Romanovsky wrote: > >>> [Some people who received this mess

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-06-18 Thread Leon Romanovsky
On Tue, Jun 18, 2024 at 11:08:34AM +, Omer Shpigelman wrote: > On 6/17/24 22:04, Leon Romanovsky wrote: > > [Some people who received this message don't often get email from > > l...@kernel.org. Learn why this is important at > > https://aka.ms/LearnAboutSenderId

Re: [PATCH 04/15] net: hbl_cn: QP state machine

2024-06-18 Thread Leon Romanovsky
On Tue, Jun 18, 2024 at 07:58:55AM +, Omer Shpigelman wrote: > On 6/18/24 10:08, Leon Romanovsky wrote: > > On Tue, Jun 18, 2024 at 05:50:15AM +, Omer Shpigelman wrote: > >> On 6/17/24 16:18, Leon Romanovsky wrote: > >>> [Some people who received this mess

Re: [PATCH 04/15] net: hbl_cn: QP state machine

2024-06-18 Thread Leon Romanovsky
On Tue, Jun 18, 2024 at 05:50:15AM +, Omer Shpigelman wrote: > On 6/17/24 16:18, Leon Romanovsky wrote: > > [Some people who received this message don't often get email from > > l...@kernel.org. Learn why this is important at > > https://aka.ms/LearnAboutSenderId

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-06-17 Thread Leon Romanovsky
On Mon, Jun 17, 2024 at 05:43:49PM +, Omer Shpigelman wrote: > On 6/13/24 22:18, Leon Romanovsky wrote: > > [Some people who received this message don't often get email from > > l...@kernel.org. Learn why this is important at > > https://aka.ms/LearnAboutSenderId

Re: [PATCH 04/15] net: hbl_cn: QP state machine

2024-06-17 Thread Leon Romanovsky
On Thu, Jun 13, 2024 at 11:21:57AM +0300, Omer Shpigelman wrote: > Add a common QP state machine which handles the moving for a QP from one > state to another including performing necessary checks, draining > in-flight transactions, invalidating caches and error reporting. > > Signed-off-by: Omer

Re: [PATCH 01/15] net: hbl_cn: add habanalabs Core Network driver

2024-06-17 Thread Leon Romanovsky
On Mon, Jun 17, 2024 at 08:08:26AM +, Omer Shpigelman wrote: > On 6/13/24 16:01, Przemek Kitszel wrote: > > [Some people who received this message don't often get email from > > przemyslaw.kits...@intel.com. Learn why this is important at > > https://aka.ms/LearnAboutSenderIdentification ] >

Re: [PATCH 11/15] RDMA/hbl: add habanalabs RDMA driver

2024-06-13 Thread Leon Romanovsky
On Thu, Jun 13, 2024 at 11:22:04AM +0300, Omer Shpigelman wrote: > Add an RDMA driver of Gaudi ASICs family for AI scaling. > The driver itself is agnostic to the ASIC in action, it operates according > to the capabilities that were passed on device initialization. > The device is initialized by th

Re: [PATCH 3/3] RDMA/hfi1: Use RMW accessors for changing LNKCTL2

2024-05-05 Thread Leon Romanovsky
On Fri, May 03, 2024 at 10:04:16AM -0300, Jason Gunthorpe wrote: > On Fri, May 03, 2024 at 01:18:35PM +0300, Ilpo Järvinen wrote: > > On Thu, 15 Feb 2024, Ilpo Järvinen wrote: > > > > > Convert open coded RMW accesses for LNKCTL2 to use > > > pcie_capability_clear_and_set_word() which makes its ea

Re: [PATCH v1 2/2] vfio/pci: Allow MMIO regions to be exported through dma-buf

2024-05-02 Thread Leon Romanovsky
On Thu, May 02, 2024 at 07:50:36AM +, Kasireddy, Vivek wrote: > Hi Jason, <...> > > I'd rather we stick with the original design. Leon is working on DMA > > API changes that should address half the issue. > Ok, I'll keep an eye out for Leon's work. The code for v1 is here: https://git.kernel

Re: [PATCH v0 01/14] IB/hfi1, IB/qib: Make I2C terminology more inclusive

2024-04-03 Thread Leon Romanovsky
On Fri, Mar 29, 2024 at 05:00:25PM +, Easwar Hariharan wrote: > I2C v7, SMBus 3.2, and I3C specifications have replaced "master/slave" > with more appropriate terms. Inspired by and following on to Wolfram's series > to fix drivers/i2c[1], fix the terminology where I had a role to play, now >

Re: [RFC PATCH v2 02/11] netdev: implement netlink api to bind dma-buf to netdevice

2023-08-13 Thread Leon Romanovsky
On Wed, Aug 09, 2023 at 06:57:38PM -0700, Mina Almasry wrote: > Add a netdev_dmabuf_binding struct which represents the > dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to > an rx queue on the netdevice. On the binding, the dma_buf_attach > & dma_buf_map_attachment will occur.

Re: [PATCH] net: ksz884x: Remove the unused function port_cfg_force_flow_ctrl()

2022-12-12 Thread Leon Romanovsky
On Mon, Dec 12, 2022 at 11:53:09AM +0800, Jiapeng Chong wrote: > The function port_cfg_force_flow_ctrl() is defined in the ksz884x.c file, > but not called elsewhere, so remove this unused function. > > drivers/net/ethernet/micrel/ksz884x.c:2212:20: warning: unused function > 'port_cfg_force_flow

Re: [PATCH RFC 10/19] RDMA/umem: remove FOLL_FORCE usage

2022-11-14 Thread Leon Romanovsky
or debugger access. > > Cc: Jason Gunthorpe > Cc: Leon Romanovsky > Signed-off-by: David Hildenbrand > --- > drivers/infiniband/core/umem.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Thanks, Tested-by: Leon Romanovsky # Over mlx4 and mlx5.

Re: [PATCH][next] treewide: Replace zero-length arrays with flexible-array members

2022-02-15 Thread Leon Romanovsky
On Tue, Feb 15, 2022 at 01:21:10PM -0600, Gustavo A. R. Silva wrote: > On Tue, Feb 15, 2022 at 10:17:40AM -0800, Kees Cook wrote: > > On Tue, Feb 15, 2022 at 11:47:43AM -0600, Gustavo A. R. Silva wrote: > > > There is a regular need in the kernel to provide a way to declare > > > having a dynamical

Re: [PATCH rdma-next v4 0/3] SG fix together with update to RDMA umem

2021-08-30 Thread Leon Romanovsky
On Tue, Aug 24, 2021 at 05:25:28PM +0300, Maor Gottlieb wrote: > From: Maor Gottlieb > > Changelog: > v4: > * Unify sg_free_table_entries with __sg_free_table > v3: https://lore.kernel.org/lkml/cover.1627551226.git.leo...@nvidia.com/ > * Rewrote to new API suggestion > * Split for more patches

Re: [PATCH rdma-next v4 0/3] SG fix together with update to RDMA umem

2021-08-30 Thread Leon Romanovsky
On Mon, Aug 30, 2021 at 10:31:28AM -0300, Jason Gunthorpe wrote: > On Mon, Aug 30, 2021 at 11:21:00AM +0300, Leon Romanovsky wrote: > > On Tue, Aug 24, 2021 at 05:25:28PM +0300, Maor Gottlieb wrote: > > > From: Maor Gottlieb > > > > > > Changelog: > >

[PATCH rdma-next v3 2/3] lib/scatterlist: Fix wrong update of orig_nents

2021-07-29 Thread Leon Romanovsky
entries in the table. Now all APIs set orig_nents as number of enries with pages. Fixes: 07da1223ec93 ("lib/scatterlist: Add support in dynamic allocation of SG table from pages") Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/umem.c | 34 ++

[PATCH rdma-next v3 3/3] RDMA: Use the sg_table directly and remove the opencoded version from umem

2021-07-29 Thread Leon Romanovsky
From: Maor Gottlieb This allows using the normal sg_table APIs and makes all the code cleaner. Remove sgt, nents and nmapd from ib_umem. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- drivers/infiniband/core/umem.c | 32

[PATCH rdma-next v3 1/3] lib/scatterlist: Provide a dedicated function to support table append

2021-07-29 Thread Leon Romanovsky
: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/gpu/drm/drm_prime.c | 13 --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 11 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 14 +++- drivers/infiniband/core/umem.c | 4 +-- include/linux

[PATCH rdma-next v3 0/3] SG fix together with update to RDMA umem

2021-07-29 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v3: * Rewrote to new API suggestion * Split for more patches v2: https://lore.kernel.org/lkml/cover.1626605893.git.leo...@nvidia.com * Changed implementation of first patch, based on our discussion with Christoph. https://lore.kernel.org/lkml/ynwavtt0qmqdx

[PATCH rdma-next v2 1/2] lib/scatterlist: Fix wrong update of orig_nents

2021-07-18 Thread Leon Romanovsky
lib/scatterlist: Add support in dynamic allocation of SG table from pages") Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/gpu/drm/drm_prime.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer

[PATCH rdma-next v2 2/2] RDMA: Use dma_map_sgtable for map umem pages

2021-07-18 Thread Leon Romanovsky
-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/umem.c| 28 +++ drivers/infiniband/core/umem_dmabuf.c | 1 - drivers/infiniband/hw/mlx4/mr.c | 4 ++-- drivers/infiniband/hw/mlx5/mr.c | 3 ++- drivers/infiniband/sw

[PATCH rdma-next v2 0/2] SG fix together with update to RDMA umem

2021-07-18 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v2: * Changed implementation of first patch, based on our discussion with Christoph. https://lore.kernel.org/lkml/ynwavtt0qmqdx...@infradead.org/ v1: https://lore.kernel.org/lkml/cover.1624955710.git.leo...@nvidia.com/ * Fixed sg_page with a _dma_ API in

Re: [PATCH 02/13] vfio: Introduce a vfio_uninit_group_dev() API call

2021-07-15 Thread Leon Romanovsky
On Wed, Jul 14, 2021 at 09:20:31PM -0300, Jason Gunthorpe wrote: > From: Max Gurtovoy > > This pairs with vfio_init_group_dev() and allows undoing any state that is > stored in the vfio_device unrelated to registration. Add appropriately > placed calls to all the drivers. > > The following patch

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-18 Thread Leon Romanovsky
On Mon, Apr 19, 2021 at 12:27:22PM +0800, Alice Guo (OSS) wrote: > From: Alice Guo > > Update all the code that use soc_device_match because add support for > soc_device_match returning -EPROBE_DEFER. > > Signed-off-by: Alice Guo > --- > drivers/bus/ti-sysc.c | 2 +- >

Re: [PATCH rdma-core v7 4/6] pyverbs: Add dma-buf based MR support

2021-02-02 Thread Leon Romanovsky
On Tue, Feb 02, 2021 at 04:24:45PM +0100, Daniel Vetter wrote: > On Mon, Feb 01, 2021 at 05:03:44PM +, Xiong, Jianxin wrote: > > > -Original Message- > > > From: Jason Gunthorpe > > > Sent: Monday, February 01, 2021 7:29 AM > > > To: Daniel

Re: [PATCH rdma-core v7 4/6] pyverbs: Add dma-buf based MR support

2021-01-31 Thread Leon Romanovsky
On Sun, Jan 31, 2021 at 05:31:16PM +0200, Gal Pressman wrote: > On 25/01/2021 21:57, Jianxin Xiong wrote: > > Define a new sub-class of 'MR' that uses dma-buf object for the memory > > region. Define a new class 'DmaBuf' as a wrapper for dma-buf allocation > > mechanism implemented in C. > > > > Up

Re: [PATCH v14 4/4] RDMA/mlx5: Support dma-buf based userspace memory region

2020-12-08 Thread Leon Romanovsky
On Tue, Dec 08, 2020 at 02:39:15PM -0800, Jianxin Xiong wrote: > Implement the new driver method 'reg_user_mr_dmabuf'. Utilize the core > functions to import dma-buf based memory region and update the mappings. > > Add code to handle dma-buf related page fault. > > Signed-off-by: Jianxin Xiong >

Re: [PATCH v14 1/4] RDMA/umem: Support importing dma-buf as user memory region

2020-12-08 Thread Leon Romanovsky
On Tue, Dec 08, 2020 at 02:39:12PM -0800, Jianxin Xiong wrote: > Dma-buf is a standard cross-driver buffer sharing mechanism that can be > used to support peer-to-peer access from RDMA devices. > > Device memory exported via dma-buf is associated with a file descriptor. > This is passed to the user

Re: [PATCH v13 1/4] RDMA/umem: Support importing dma-buf as user memory region

2020-12-08 Thread Leon Romanovsky
On Tue, Dec 08, 2020 at 06:13:20PM +, Xiong, Jianxin wrote: > > -Original Message- > > From: Leon Romanovsky > > Sent: Monday, December 07, 2020 11:06 PM > > To: Xiong, Jianxin > > Cc: linux-r...@vger.kernel.org; dri-devel@lists.freedesktop.org; Doug

Re: [PATCH v13 2/4] RDMA/core: Add device method for registering dma-buf based memory region

2020-12-07 Thread Leon Romanovsky
Reviewed-by: Sean Hefty > Acked-by: Michael J. Ruhl > Acked-by: Christian Koenig > Acked-by: Daniel Vetter > --- > drivers/infiniband/core/device.c | 1 + > include/rdma/ib_verbs.h | 6 +- > 2 files changed, 6 insertions(+), 1 deletion(-)

Re: [PATCH v13 3/4] RDMA/uverbs: Add uverbs command for dma-buf based MR registration

2020-12-07 Thread Leon Romanovsky
stian Koenig > Acked-by: Daniel Vetter > --- > drivers/infiniband/core/uverbs_std_types_mr.c | 117 > +- > include/uapi/rdma/ib_user_ioctl_cmds.h| 14 +++ > 2 files changed, 129 insertions(+), 2 deletions(-)

Re: [PATCH v13 1/4] RDMA/umem: Support importing dma-buf as user memory region

2020-12-07 Thread Leon Romanovsky
On Mon, Dec 07, 2020 at 02:15:50PM -0800, Jianxin Xiong wrote: > Dma-buf is a standard cross-driver buffer sharing mechanism that can be > used to support peer-to-peer access from RDMA devices. > > Device memory exported via dma-buf is associated with a file descriptor. > This is passed to the user

[PATCH rdma-next v5 2/4] tools/testing/scatterlist: Rejuvenate bit-rotten test

2020-10-04 Thread Leon Romanovsky
From: Tvrtko Ursulin A couple small tweaks are needed to make the test build and run on current kernels. Signed-off-by: Tvrtko Ursulin Cc: Maor Gottlieb Signed-off-by: Leon Romanovsky --- tools/testing/scatterlist/Makefile | 3 ++- tools/testing/scatterlist/linux/mm.h | 35

[PATCH rdma-next v5 1/4] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-10-04 Thread Leon Romanovsky
h the Infiniband driver that allocates a single page for hold the pages. For 1TB memory registration, the temporary buffer would consume only 4KB, instead of 2GB. Signed-off-by: Maor Gottlieb Reviewed-by: Christoph Hellwig Signed-off-by: Leon Romanovsky --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c

[PATCH rdma-next v5 4/4] RDMA/umem: Move to allocate SG table from pages

2020-10-04 Thread Leon Romanovsky
600.0MB After512001.2MB Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/umem.c | 94 +- 1 file changed, 12 insertions(+), 82 deletions(-) diff --git a/drivers/infiniband/core/umem.c b

[PATCH rdma-next v5 0/4] Dynamicaly allocate SG table from the pages

2020-10-04 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v5: * Use sg_init_table to allocate table and avoid changes is __sg_alloc_table * Fix offset issue v4: https://lore.kernel.org/lkml/20200927064647.3106737-1-l...@kernel.org * Fixed formatting in first patch. * Added fix (clear tmp_netnts) in first patch to

[PATCH rdma-next v5 3/4] tools/testing/scatterlist: Show errors in human readable form

2020-10-04 Thread Leon Romanovsky
From: Tvrtko Ursulin Instead of just asserting dump some more useful info about what the test saw versus what it expected to see. Signed-off-by: Tvrtko Ursulin Cc: Maor Gottlieb Signed-off-by: Leon Romanovsky --- tools/testing/scatterlist/main.c | 44 1 file

Re: [PATCH rdma-next v4 4/4] RDMA/umem: Move to allocate SG table from pages

2020-09-30 Thread Leon Romanovsky
On Wed, Sep 30, 2020 at 12:14:06PM -0300, Jason Gunthorpe wrote: > On Wed, Sep 30, 2020 at 06:05:15PM +0300, Maor Gottlieb wrote: > > This is right only for the last iteration. E.g. in the first iteration in > > case that there are more pages (left_pages), then we allocate > > SG_MAX_SINGLE_ALLOC. 

Re: [PATCH rdma-next v4 4/4] RDMA/umem: Move to allocate SG table from pages

2020-09-30 Thread Leon Romanovsky
On Tue, Sep 29, 2020 at 04:59:29PM -0300, Jason Gunthorpe wrote: > On Sun, Sep 27, 2020 at 09:46:47AM +0300, Leon Romanovsky wrote: > > @@ -296,11 +223,17 @@ static struct ib_umem *__ib_umem_get(struct ib_device > > *device, > > goto umem_release; > &g

[PATCH rdma-next v4 1/4] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-09-26 Thread Leon Romanovsky
h the Infiniband driver that allocates a single page for hold the pages. For 1TB memory registration, the temporary buffer would consume only 4KB, instead of 2GB. Signed-off-by: Maor Gottlieb Reviewed-by: Christoph Hellwig Signed-off-by: Leon Romanovsky --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c

[PATCH rdma-next v4 4/4] RDMA/umem: Move to allocate SG table from pages

2020-09-26 Thread Leon Romanovsky
600.0MB After512001.2MB Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/umem.c | 92 +- 1 file changed, 12 insertions(+), 80 deletions(-) diff --git a/drivers/infiniband/core/umem.c b

[PATCH rdma-next v4 0/4] Dynamicaly allocate SG table from the pages

2020-09-26 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v4: * Fixed formatting in first patch. * Added fix (clear tmp_netnts) in first patch to fix i915 failure. * Added test patches v3: https://lore.kernel.org/linux-rdma/20200922083958.2150803-1-l...@kernel.org/ * Squashed Christopher's suggestion to

[PATCH rdma-next v4 2/4] tools/testing/scatterlist: Rejuvenate bit-rotten test

2020-09-26 Thread Leon Romanovsky
From: Tvrtko Ursulin A couple small tweaks are needed to make the test build and run on current kernels. Signed-off-by: Tvrtko Ursulin Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- tools/testing/scatterlist/Makefile | 3 ++- tools/testing/scatterlist/linux/mm.h | 35

[PATCH rdma-next v4 3/4] tools/testing/scatterlist: Show errors in human readable form

2020-09-26 Thread Leon Romanovsky
From: Tvrtko Ursulin Instead of just asserting dump some more useful info about what the test saw versus what it expected to see. Signed-off-by: Tvrtko Ursulin Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- tools/testing/scatterlist/main.c | 44

Re: [Intel-gfx] [PATCH rdma-next v3 1/2] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-09-25 Thread Leon Romanovsky
On Thu, Sep 24, 2020 at 09:21:20AM +0100, Tvrtko Ursulin wrote: > > On 22/09/2020 09:39, Leon Romanovsky wrote: > > From: Maor Gottlieb > > > > Extend __sg_alloc_table_from_pages to support dynamic allocation of > > SG table from pages. It should be used by drivers

[PATCH rdma-next v3 1/2] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-09-22 Thread Leon Romanovsky
h the Infiniband driver that allocates a single page for hold the pages. For 1TB memory registration, the temporary buffer would consume only 4KB, instead of 2GB. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 12 +- drivers/gpu/drm/v

[PATCH rdma-next v3 0/2] Dynamicaly allocate SG table from the pages

2020-09-22 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v3: * Squashed Christopher's suggestion to avoid introduced new API, but extend existing one. v2: https://lore.kernel.org/linux-rdma/20200916140726.839377-1-l...@kernel.org * Fixed indentations and comments * Deleted sg_alloc_next() * Squashe

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-24 Thread Leon Romanovsky
On Tue, Dec 24, 2019 at 06:03:50PM -0800, John Hubbard wrote: > On 12/22/19 5:23 AM, Leon Romanovsky wrote: > > On Fri, Dec 20, 2019 at 03:54:55PM -0800, John Hubbard wrote: > > > On 12/20/19 10:29 AM, Leon Romanovsky wrote: > > > ... > > > > > $ ./b

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-22 Thread Leon Romanovsky
On Fri, Dec 20, 2019 at 03:54:55PM -0800, John Hubbard wrote: > On 12/20/19 10:29 AM, Leon Romanovsky wrote: > ... > >> $ ./build.sh > >> $ build/bin/run_tests.py > >> > >> If you get things that far I think Leon can get a reproduction for you > >

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-21 Thread Leon Romanovsky
On Fri, Dec 20, 2019 at 03:54:55PM -0800, John Hubbard wrote: > On 12/20/19 10:29 AM, Leon Romanovsky wrote: > ... > >> $ ./build.sh > >> $ build/bin/run_tests.py > >> > >> If you get things that far I think Leon can get a reproduction for you > >

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-20 Thread Leon Romanovsky
On Thu, Dec 19, 2019 at 02:58:43PM -0800, John Hubbard wrote: > On 12/19/19 1:07 PM, Jason Gunthorpe wrote: > ... > > > 3. It would be nice if I could reproduce this. I have a two-node mlx5 > > > Infiniband > > > test setup, but I have done only the tiniest bit of user space IB coding, > > > so >

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-20 Thread Leon Romanovsky
On Thu, Dec 19, 2019 at 05:07:43PM -0400, Jason Gunthorpe wrote: > On Thu, Dec 19, 2019 at 12:30:31PM -0800, John Hubbard wrote: > > On 12/19/19 5:26 AM, Leon Romanovsky wrote: > > > On Mon, Dec 16, 2019 at 02:25:12PM -0800, John Hubbard wrote: > > > > Hi, > >

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-19 Thread Leon Romanovsky
On Mon, Dec 16, 2019 at 02:25:12PM -0800, John Hubbard wrote: > Hi, > > This implements an API naming change (put_user_page*() --> > unpin_user_page*()), and also implements tracking of FOLL_PIN pages. It > extends that tracking to a few select subsystems. More subsystems will > be added in follow

Re: [PATCH v7 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-24 Thread Leon Romanovsky
On Thu, Nov 21, 2019 at 10:36:43AM -0400, Jason Gunthorpe wrote: > On Thu, Nov 21, 2019 at 12:07:46AM -0800, Christoph Hellwig wrote: > > On Wed, Nov 20, 2019 at 11:13:37PM -0800, John Hubbard wrote: > > > And get rid of the mmap_sem calls, as part of that. Note > > > that get_user_pages_fast() wil

Re: [PATCH v15 13/17] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr()

2019-05-06 Thread Leon Romanovsky
On Mon, May 06, 2019 at 04:50:20PM -0300, Jason Gunthorpe wrote: > On Mon, May 06, 2019 at 06:30:59PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0

Re: [RFC PATCH 0/5] cgroup support for GPU devices

2019-05-05 Thread Leon Romanovsky
On Sun, May 05, 2019 at 12:34:16PM -0400, Kenny Ho wrote: > (sent again. Not sure why my previous email was just a reply instead > of reply-all.) > > On Sun, May 5, 2019 at 12:05 PM Leon Romanovsky wrote: > > We are talking about two different access patterns for this device &g

Re: [RFC PATCH 0/5] cgroup support for GPU devices

2019-05-05 Thread Leon Romanovsky
On Sun, May 05, 2019 at 10:21:30AM -0400, Kenny Ho wrote: > On Sun, May 5, 2019 at 3:14 AM Leon Romanovsky wrote: > > > > Doesn't RDMA already has a separate cgroup? Why not implement it there? > > > > > > > > > > Hi Kenny, I can't answer fo

Re: [RFC PATCH 0/5] cgroup support for GPU devices

2019-05-05 Thread Leon Romanovsky
On Fri, May 03, 2019 at 02:14:33PM -0700, Welty, Brian wrote: > > On 5/2/2019 3:48 PM, Kenny Ho wrote: > > On 5/2/2019 1:34 AM, Leon Romanovsky wrote: > >> Count us (Mellanox) too, our RDMA devices are exposing special and > >> limited in size device memory to

Re: [RFC PATCH 0/5] cgroup support for GPU devices

2019-05-02 Thread Leon Romanovsky
On Wed, May 01, 2019 at 10:04:33AM -0400, Brian Welty wrote: > In containerized or virtualized environments, there is desire to have > controls in place for resources that can be consumed by users of a GPU > device. This RFC patch series proposes a framework for integrating > use of existing cgrou

Re: [PATCH v13 16/20] IB/mlx4, arm64: untag user pointers in mlx4_get_umem_mr

2019-04-29 Thread Leon Romanovsky
amp;& vma->vm_end >= untagged_start + length && > + vma->vm_start <= untagged_start) { > if (vma->vm_flags & VM_WRITE) > access_flags |= IB_ACCESS_LOCAL_WRITE; > } else { > -- Thanks, Reviewed-by: Leon Romanov

Re: [PATCH v6 7/8] mm/mmu_notifier: pass down vma and reasons why mmu notifier is happening v2

2019-04-10 Thread Leon Romanovsky
On Wed, Apr 10, 2019 at 04:41:57PM -0700, Ira Weiny wrote: > On Tue, Mar 26, 2019 at 12:47:46PM -0400, Jerome Glisse wrote: > > From: Jérôme Glisse > > > > CPU page table update can happens for many reasons, not only as a result > > of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-17 Thread Leon Romanovsky
On Mon, Jul 16, 2018 at 04:12:49PM -0700, Andrew Morton wrote: > On Mon, 16 Jul 2018 13:50:58 +0200 Michal Hocko wrote: > > > From: Michal Hocko > > > > There are several blockable mmu notifiers which might sleep in > > mmu_notifier_invalidate_range_start and that is a problem for the > > oom_rea

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-16 Thread Leon Romanovsky
On Tue, Jul 10, 2018 at 04:14:10PM +0200, Michal Hocko wrote: > On Tue 10-07-18 16:40:40, Leon Romanovsky wrote: > > On Mon, Jul 09, 2018 at 02:29:08PM +0200, Michal Hocko wrote: > > > On Wed 27-06-18 09:44:21, Michal Hocko wrote: > > > > This is the v2 of RFC based

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-11 Thread Leon Romanovsky
On Wed, Jul 11, 2018 at 01:13:18PM +0200, Michal Hocko wrote: > On Wed 11-07-18 13:14:47, Leon Romanovsky wrote: > > On Wed, Jul 11, 2018 at 11:03:53AM +0200, Michal Hocko wrote: > > > On Tue 10-07-18 19:20:20, Leon Romanovsky wrote: > > > > On Tue, Jul 10, 2018 at

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-11 Thread Leon Romanovsky
On Wed, Jul 11, 2018 at 11:03:53AM +0200, Michal Hocko wrote: > On Tue 10-07-18 19:20:20, Leon Romanovsky wrote: > > On Tue, Jul 10, 2018 at 04:14:10PM +0200, Michal Hocko wrote: > > > On Tue 10-07-18 16:40:40, Leon Romanovsky wrote: > > > > On Mon, Jul 09, 2018 at

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-10 Thread Leon Romanovsky
On Tue, Jul 10, 2018 at 04:14:10PM +0200, Michal Hocko wrote: > On Tue 10-07-18 16:40:40, Leon Romanovsky wrote: > > On Mon, Jul 09, 2018 at 02:29:08PM +0200, Michal Hocko wrote: > > > On Wed 27-06-18 09:44:21, Michal Hocko wrote: > > > > This is the v2 of RFC based

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-10 Thread Leon Romanovsky
On Mon, Jul 09, 2018 at 02:29:08PM +0200, Michal Hocko wrote: > On Wed 27-06-18 09:44:21, Michal Hocko wrote: > > This is the v2 of RFC based on the feedback I've received so far. The > > code even compiles as a bonus ;) I haven't runtime tested it yet, mostly > > because I have no idea how. > > >

Re: [PATCH rdma-next 01/21] drm/i915: Move u64-to-ptr helpers to general header

2018-05-15 Thread Leon Romanovsky
On Mon, May 14, 2018 at 02:10:54PM -0600, Jason Gunthorpe wrote: > On Thu, May 03, 2018 at 04:36:55PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > The macro u64_to_ptr() and function ptr_to_u64() are useful enough > > to be part of general header, s

[PATCH rdma-next 01/21] drm/i915: Move u64-to-ptr helpers to general header

2018-05-03 Thread Leon Romanovsky
From: Leon Romanovsky The macro u64_to_ptr() and function ptr_to_u64() are useful enough to be part of general header, so move them there and allow RDMA subsystem reuse them. Signed-off-by: Leon Romanovsky --- drivers/gpu/drm/i915/i915_utils.h | 12 ++-- include/linux/kernel.h

Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to

2017-10-09 Thread Leon Romanovsky
On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote: <...> > > By splitting out the radix_tree_root definition, > we can reduce the header file dependency. > > Reducing the header dependency will help for speeding the kernel > build, suppressing unnecessary recompile of objects during

Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to

2017-10-09 Thread Leon Romanovsky
On Mon, Oct 09, 2017 at 02:58:58PM +0900, Masahiro Yamada wrote: > 2017-10-09 3:52 GMT+09:00 Leon Romanovsky : > > On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote: > > > > <...> > >> > >> By splitting out the radix_tree_root definition,