Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6062710yba; Thu, 11 Apr 2019 11:14:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwf1NQeV0/91pvIKM9YHOr7mVeh/YtMA9UQczIryeNm+iFiOTE6s5cYVPgR0aM3Bw3dPbmy X-Received: by 2002:a65:6389:: with SMTP id h9mr48831018pgv.398.1555006454928; Thu, 11 Apr 2019 11:14:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555006454; cv=none; d=google.com; s=arc-20160816; b=hlZklpb+DUvTIyYHgS0JVYNRWjMdEsTJKnzdsMtzrwpAXNJCNq2qznEHHC3TyfAWi6 5AbcYp5rQ806btxGn2k6F9vEz5SJREiJxr0AmxWB7fP39gmbb8upqdUBTnW2S9If/FAG Gsq9Ve++RG5fwl0jW7aTAdFZyfOXWUhziMmORQoFz2mQnSUFHv/sw7Ce520UK0OVCaHB PF4cmT/40NP9mcsHIjT5/AIZkISo5qnNShnC37gxxohStlB5VSoA0Yf8exExhUKcouW7 GfHIpopKxSfNYUJn1kq2+IeDMC9GlbgTEFbAphEQkC+HlhBiG81uPWzrwDKHBG2ug5Z+ wFEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=O9vgsi8kX0d18NQvusMtgpS64oDQS5TFnj09W8PAezI=; b=QHa5bD6lDIk77VxzpokaIUc+b+aXfGcV2+A2cS58Byj8R0AluQ9pvcGu0iC2DY269l wm3u0JU6RmU7OXeVVKcXEml4R8+qQO1+sf0J9BhcwgXK4NJdNXItyhxGadWSGOpnODfC V1Mvv4Kip0CgfoPpcICkJVQDdPkCaH4tyndwSlune0uQYOixlgC1cemtVa5xBTgfVXyD Z0iHg2AD+bX1pBrYTULKz+jpGsLUbOlu1DPgy14DFIm4pnH/gm/BM2Zl/fA7l7moemCV M5fxfyMHOSVBN/mbjPkbUjBzr2fqdchBdu8V/E9zpD5VBE/5WQmXR3WsqW2dpsK74bm0 qYgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o185si29118174pga.164.2019.04.11.11.13.58; Thu, 11 Apr 2019 11:14:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726727AbfDKSNV (ORCPT + 99 others); Thu, 11 Apr 2019 14:13:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53946 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726538AbfDKSNU (ORCPT ); Thu, 11 Apr 2019 14:13:20 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 29B2A2D7EB; Thu, 11 Apr 2019 18:13:20 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.20.6.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18487608A7; Thu, 11 Apr 2019 18:13:19 +0000 (UTC) From: jglisse@redhat.com To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , linux-rdma@vger.kernel.org, Jason Gunthorpe , Leon Romanovsky , Doug Ledford , Artemy Kovalyov , Moni Shoua , Mike Marciniszyn , Kaike Wan , Dennis Dalessandro Subject: [PATCH v4 0/1] Use HMM for ODP v4 Date: Thu, 11 Apr 2019 14:13:13 -0400 Message-Id: <20190411181314.19465-1-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 11 Apr 2019 18:13:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jérôme Glisse Just fixed Kconfig and build when ODP was not enabled, other than that this is the same as v3. Here is previous cover letter: Git tree with all prerequisite: https://cgit.freedesktop.org/~glisse/linux/log/?h=rdma-odp-hmm-v4 This patchset convert RDMA ODP to use HMM underneath this is motivated by stronger code sharing for same feature (share virtual memory SVM or Share Virtual Address SVA) and also stronger integration with mm code to achieve that. It depends on HMM patchset posted for inclusion in 5.2 [2] and [3]. It has been tested with pingpong test with -o and others flags to test different size/features associated with ODP. Moreover they are some features of HMM in the works like peer to peer support, fast CPU page table snapshot, fast IOMMU mapping update ... It will be easier for RDMA devices with ODP to leverage those if they use HMM underneath. Quick summary of what HMM is: HMM is a toolbox for device driver to implement software support for Share Virtual Memory (SVM). Not only it provides helpers to mirror a process address space on a device (hmm_mirror). It also provides helper to allow to use device memory to back regular valid virtual address of a process (any valid mmap that is not an mmap of a device or a DAX mapping). They are two kinds of device memory. Private memory that is not accessible to CPU because it does not have all the expected properties (this is for all PCIE devices) or public memory which can also be access by CPU without restriction (with OpenCAPI or CCIX or similar cache-coherent and atomic inter-connect). Device driver can use each of HMM tools separatly. You do not have to use all the tools it provides. For RDMA device i do not expect a need to use the device memory support of HMM. This device memory support is geared toward accelerator like GPU. You can find a branch [1] with all the prerequisite in. This patch is on top of rdma-next with the HMM patchset [2] and mmu notifier patchset [3] applied on top of it. [1] https://cgit.freedesktop.org/~glisse/linux/log/?h=rdma-odp-hmm-v4 [2] https://lkml.org/lkml/2019/4/3/1032 [3] https://lkml.org/lkml/2019/3/26/900 Cc: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: Doug Ledford Cc: Artemy Kovalyov Cc: Moni Shoua Cc: Mike Marciniszyn Cc: Kaike Wan Cc: Dennis Dalessandro Jérôme Glisse (1): RDMA/odp: convert to use HMM for ODP v4 drivers/infiniband/Kconfig | 3 +- drivers/infiniband/core/umem_odp.c | 499 ++++++++--------------------- drivers/infiniband/hw/mlx5/mem.c | 20 +- drivers/infiniband/hw/mlx5/mr.c | 2 +- drivers/infiniband/hw/mlx5/odp.c | 106 +++--- include/rdma/ib_umem_odp.h | 49 ++- 6 files changed, 231 insertions(+), 448 deletions(-) -- 2.20.1