Message ID | 20240611182732.360317-5-martin.oliveira@eideticom.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A42D9C27C75 for <linux-mm@archiver.kernel.org>; Tue, 11 Jun 2024 18:29:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3425D6B00C2; Tue, 11 Jun 2024 14:29:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2CBB66B00C4; Tue, 11 Jun 2024 14:29:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0F64F6B00C5; Tue, 11 Jun 2024 14:29:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id DE5016B00C2 for <linux-mm@kvack.org>; Tue, 11 Jun 2024 14:29:46 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A17311614C3 for <linux-mm@kvack.org>; Tue, 11 Jun 2024 18:29:46 +0000 (UTC) X-FDA: 82219446372.27.B1C8EC1 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2119.outbound.protection.outlook.com [40.107.236.119]) by imf12.hostedemail.com (Postfix) with ESMTP id E3DC940004 for <linux-mm@kvack.org>; Tue, 11 Jun 2024 18:29:43 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=eideticcom.onmicrosoft.com header.s=selector2-eideticcom-onmicrosoft-com header.b=QTeiy5Vg; dmarc=none; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf12.hostedemail.com: domain of Martin.Oliveira@eideticom.com designates 40.107.236.119 as permitted sender) smtp.mailfrom=Martin.Oliveira@eideticom.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718130583; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gvCcvfD9XrahsrBCD4LSwm0IoahU4H0qyoBCobOTXhU=; b=ERSTQQ5yByzMuzeJh8wOhexnskRvvWT2AIevDpkVzNXdzLh/Aw7Wy8c931oxV/FRJanIfp ZQzY0PSamoxPhRHFH4tX5Y8m84Rua6yuVn794IIML7gAmXY28ymo/tm6oFcrcw09/ITi/Y 5ymUzEHiYt4kVmFeBWgv7wL4iOLkr1w= ARC-Authentication-Results: i=2; imf12.hostedemail.com; dkim=pass header.d=eideticcom.onmicrosoft.com header.s=selector2-eideticcom-onmicrosoft-com header.b=QTeiy5Vg; dmarc=none; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf12.hostedemail.com: domain of Martin.Oliveira@eideticom.com designates 40.107.236.119 as permitted sender) smtp.mailfrom=Martin.Oliveira@eideticom.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1718130583; a=rsa-sha256; cv=pass; b=MI5evQzCbxAz92XNKi0LxX8n099WrL9kGRNaqR0jg+H+CdlKmEMWajpGkmDqp1XlEfS4jD tAAuA1vjlwb8d7sqPofR/wCGBcoiZUewWOua4JARY2sRmtjvgfvg+MZq5wP2tvDAGzg3g0 SQMd12rEpm9Z00AIqcqUql1GPbLALKQ= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HHPv94/4NYgc+yrQA43KgpiQ3tU4Ofy7LopO3JPab5fgIZz7sfZ4v++KFSKkTN4+7d54IIt4fPwQ44hcGyHJKfZ3AAfaT1kNCibDDXs8qhiRrRHz83JBdgezz+kKuqSEAbeb8Yy1A3ke4UThnIOAakS9LN4k/iO9Uw0HwbHTsBlUSYqH1ziEjwMXEYBZVGrodK2RJl5revROrP4xovSVdgG7FYIw+Tgnm70nD222/tQzHBtd05I08uudRw6Y5QDiui1ZuBikoyNnOdGbdR0UuMf2f8rWsO4agdTpQK7NqEKFNhbER/MkhBxHevRZKyYifez0Tc0nEoI0xhfSFggerg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gvCcvfD9XrahsrBCD4LSwm0IoahU4H0qyoBCobOTXhU=; b=FEvOcS295EU3BM0NDOmpLsmqWRFKpR843ESEhiFn+jR6xQCogR3k6l1qoQyS5/znLVG4ngdY80IAtwXOMzo5XBEcyJeru8H083qmUJ04VMyyzjA+IlIttD5qqyFqyD4iV0RO0+0WnhfEM+DFQV4uOI7SFEVg9kT6wYgAWkpktPjOEalFFWbmEEy4eTB9zfgtOsWyezu4guO2ihdzpEEYpaGVMhDGWiLOXotl5HSy1eHAA6x08uXlMAuuWaolvMSWxQ9+8hPl4YQbgcRQx9/LtfcEb2bho7Y1Z5uqpboTALO+crNbgjejMnP3JiyMtIbM7eUL8a/pJS4h58U4Kg1k3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eideticom.com; dmarc=pass action=none header.from=eideticom.com; dkim=pass header.d=eideticom.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eideticcom.onmicrosoft.com; s=selector2-eideticcom-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gvCcvfD9XrahsrBCD4LSwm0IoahU4H0qyoBCobOTXhU=; b=QTeiy5VgaRI/FsOLUlwLFDe1qgC8D/k6PT8t/cN48VAA+3yCw+1Ygy+G8P24csDVhIRHqd21aSl240+u895x+LyzBKLHvHWN7hwnUxBb9u5eFXtw5ZD58rMNFYsyG7sfJEfsBW/213ZPJU5BlYgfTXKUnew7wuZieS7nmusw/Rw= Received: from MW3PR19MB4250.namprd19.prod.outlook.com (2603:10b6:303:46::16) by BL1PR19MB6105.namprd19.prod.outlook.com (2603:10b6:208:39c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Tue, 11 Jun 2024 18:28:01 +0000 Received: from MW3PR19MB4250.namprd19.prod.outlook.com ([fe80::3280:d8d:de43:6376]) by MW3PR19MB4250.namprd19.prod.outlook.com ([fe80::3280:d8d:de43:6376%6]) with mapi id 15.20.7633.037; Tue, 11 Jun 2024 18:28:01 +0000 From: Martin Oliveira <martin.oliveira@eideticom.com> To: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Tejun Heo <tj@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Logan Gunthorpe <logang@deltatee.com>, Martin Oliveira <martin.oliveira@eideticom.com>, Mike Marciniszyn <mike.marciniszyn@intel.com>, Shiraz Saleem <shiraz.saleem@intel.com>, Michael Guralnik <michaelgur@nvidia.com>, Artemy Kovalyov <artemyko@nvidia.com>, Jason Gunthorpe <jgg@nvidia.com> Subject: [PATCH v2 4/4] RDMA/umem: add support for P2P RDMA Date: Tue, 11 Jun 2024 12:27:32 -0600 Message-ID: <20240611182732.360317-5-martin.oliveira@eideticom.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240611182732.360317-1-martin.oliveira@eideticom.com> References: <20240611182732.360317-1-martin.oliveira@eideticom.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4PR04CA0113.namprd04.prod.outlook.com (2603:10b6:303:83::28) To MW3PR19MB4250.namprd19.prod.outlook.com (2603:10b6:303:46::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW3PR19MB4250:EE_|BL1PR19MB6105:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a8f2ddd-db78-4eb9-4ae7-08dc8a4439e8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230032|52116006|376006|7416006|366008|1800799016|38350700006; X-Microsoft-Antispam-Message-Info: /9WyAYOuOMhT9KUFnod/oddFU56uiOZt5NRKABGc9HTPlYE1IZmJwmBKttmadUaw6N5jOYulqr/exv1Ao886YxVt6g7p+7Eob2v0puSX6DU5xE37YM8DzPjojAcPUU0vNStqqxI0FvPzg9Gi3cGPx7VRMH/sgFZ9ciX1fNJJZ5wrFVUsr6MFeYvGUJYw31vG/8ijN+7o05jLIzm9jKMXACH/P8NB45mR55ayLfep1pwVf/YYrXHb6p1pf6feOt/nmQU9iNoHZuzz9NtGmVkU2zSKgAV6NJZn9RI7MwdHg/d60Z3EX1Rqduwhlp9lwpE2xAVPskdfut0j7th5w9+PyU+AL/CFEALVOFQRlTHo24oj/1yUwcX96aCDdd8MZVS0TNL9WbIrnLmu2pw4siYkNSLaNAbPSPKqOjMMn4Zb2m1QhI4tExS+rE0CWw7ofPwcRod6lSzI2+rEjjyPkBj2Qi9PcJ1f6Fi993gx8WGY1G3vMrGLX89atgvgLMIjOHIa1kieqHgN51YNrrvWrylwY8z1Zfhtp02uUrRIdjpycEJICycF+tsU67TjJn5L4prgBc8q93NH51D5BNpIn10mbP0Oox7tAkQEorwUcKR88Mes202SaMS0RNJAiMEbCYzBkOCT2apoj6A/hztHQUztAPMyiFlT2IGhMpWBWTx2eYkBkDnHqIaNggtkc2pIbqCoNybb291sRIOKendhhG7rNn3qKKVVLrZ3En4Sr8eDK5LS82LivBvl+tBsc7WPLi+7o3qZIKQljSlDFsNCbV5VVwSBjypmCJqyvWwOkGlFnzjmnLwOvKzLfPgMfRGJlij15cu1WdS29Qt+an26uiVEyMRyk5DvgpDqbDAdiUATv0vRxCtZ38rwELUK0qwFW/UmNmfXBisEWPnwZDU9sXwsacDJDc2FA+YFBTPBFVz2KbT2Mm0thx3rrYv2rO3LizGgDRL3kv1RdUtTpx7ZRGo2AUXWoBp2WYgk+nW3jFEl4+7dnB1+J77zElnlD/m2C9YgcTPTs5aI3bnN/B+3VJAxR80gIscMUCET4lK0KNi7UiJOcydrreYH2eN1YJPMSNHF4HORK1vaPK0I/PQ4SpX1p6z6/XeU4w+bb5ZMoBRvZ6AgNgWx7V0sOFoyPV/lLGeI50ewARvSyeV6247ElzAc7XAcsudK987vTjkrRV8e4twZ7qIgDYg/HL3CxqTa6cu/lkJ5bEArbPJbGIbYN5CygWkeZrJpsWbZc8nL6mONfqwG56qE4qIhyr1Ey1cal4fLXSdPnby/K8PZoc/hcOXLw/5lHAKbtDu9KGVW9Vdgx3CEU2WhKYaW1x/g51fcXipaaJj/BAzMBX3e7/1hq4hw66kc1JtAvInE/ZXyetdX4RU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW3PR19MB4250.namprd19.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230032)(52116006)(376006)(7416006)(366008)(1800799016)(38350700006);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TEy0VCfL5PhTY8q8PXYLsIvYXOD0eOmxZG5GGLayO2B8iWO4JkRI3MyYwaCK/RWruZwY/3vZuP2STXLghIOlscAkNTn5eHtb5Ig261fVTW/k71eOQULZzloE8cZaGY1CfUWsLL875LciboCzAPnpQ21376hBeEla7wCnCEoLbqfPnKG89fXx9sHG7okwSyedlXuIkEYRxaD4ktnF2XQBIov2J0Tw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c6Nd3nbdeM57erIH4/TIl27051HkgKnFjHfNIsu1mYAYE5ts8jX5M9ewXLCOBvFwric67qm5G4rfgyRljXDYSExJ6BdJy/wclyvPV2LWrkgP8QGv6m31gwJGiBCnZQPc67zSdkWcR7aOJmY2r+EufxBPyAfxwhhmKZdXe3NR10gPqkKL7zxLOQ4gornp/Inc9K5UWos9Q2BLhfvX5TQ/VtPw16MG3X8Zogt0puTPOF8MAiDdXcPGcPTw38rwbC39lifo5HhF/4m+qOOoK7NlE0lGfoCXsgWuCvEyIxEhyRy9VsXpgDko2TQQl7CJ+IELPtPuB7DnZI= X-OriginatorOrg: eideticom.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a8f2ddd-db78-4eb9-4ae7-08dc8a4439e8 X-MS-Exchange-CrossTenant-AuthSource: MW3PR19MB4250.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 18:28:01.4494 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3490cd4b-0360-4377-abb1-15f8c5af8fc2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d9PwHMXPkw6nRjOAwcpP0DzfD8sY3KkEObxz6kA2K46DzQySUUXB/TGghyLVTsiTMoIKKtZtxnvIejn7k5By8ThWnjjIA+gDZpgP4fX6evo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR19MB6105 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: E3DC940004 X-Stat-Signature: e8jwbbi4zjagkzqfy15iym6q5teossjm X-Rspam-User: X-HE-Tag: 1718130583-25297 X-HE-Meta: U2FsdGVkX19ZTCT1F5k6DxCOatmyNASgL18kvvZ2xtNoQ1MPfTkCWrlecuYrANRecPDAW11nRIRprj4JNjt73XIYezpl2qkHbAwmBO+eeuGs7hkqX7gVUgjFWcrLsM/WPIHlYRRr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ipRZpSpU0VI+mQoHcrxQL59QplmwY/s/gZ+QcL3kUoWWc4kAFO3Zsi/iGHbVzAzCU2e+sOtLNYNFPAlAmshlnH5g9AA9LxMSMSF152YVpI5QZshartRDBzLGuoEhJ3qyt0C591e1scd5Ex36nKIku3uLcaEoQUWdRe1go57hs/3KL5Hz+GxjxXWRJI6Kp1ZAYQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series | Enable P2PDMA in Userspace RDMA | expand |
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 07c571c7b6999..b59bb6e1475e2 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -208,6 +208,9 @@ struct ib_umem *ib_umem_get(struct ib_device *device, unsigned long addr, if (umem->writable) gup_flags |= FOLL_WRITE; + if (ib_dma_pci_p2p_dma_supported(device)) + gup_flags |= FOLL_PCI_P2PDMA; + while (npages) { cond_resched(); pinned = pin_user_pages_fast(cur_base,