Message ID | 20240808183340.483468-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 1DAF4C3DA4A for <linux-mm@archiver.kernel.org>; Thu, 8 Aug 2024 18:35:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B692B6B009B; Thu, 8 Aug 2024 14:35:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B40A96B009C; Thu, 8 Aug 2024 14:35:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B9E36B009D; Thu, 8 Aug 2024 14:35:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 7E3546B009B for <linux-mm@kvack.org>; Thu, 8 Aug 2024 14:35:26 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 319B7C15E9 for <linux-mm@kvack.org>; Thu, 8 Aug 2024 18:35:26 +0000 (UTC) X-FDA: 82429931052.14.9F65190 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2134.outbound.protection.outlook.com [40.107.212.134]) by imf14.hostedemail.com (Postfix) with ESMTP id 64BC9100023 for <linux-mm@kvack.org>; Thu, 8 Aug 2024 18:35:22 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=eideticcom.onmicrosoft.com header.s=selector2-eideticcom-onmicrosoft-com header.b=e2SwepBc; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf14.hostedemail.com: domain of Martin.Oliveira@eideticom.com designates 40.107.212.134 as permitted sender) smtp.mailfrom=Martin.Oliveira@eideticom.com; dmarc=none ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723142057; 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=kM+81ayAtTLFvHOakRNJe8YX626jXBDowTU0GcX7MMs=; b=5s8TQQTKit+REa4emwr0yqlfEZLkTHiqE06ipOGnuTM0f73aYZL7MjonAf1rqCSofSbsrN 5fj+Ux4SYYFaJ75PQgHgvw885y09nnsdZ0SlvnxCNODKzMfzE86fzhCydbPvs+gnyYOl7U 9I9g02UnEiKj7tF1huLIVhHgfOZok6k= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1723142057; a=rsa-sha256; cv=pass; b=bmtxEkhjWMpKZfY0zwfyxRIsnFMuh+m9d0A28wGh7+u11Ct033spSDz3T8+oT7o8stgSow Ow8V/6z7VkCLPCkONpyWQIzGUlq9PEjbPGcYv4UJ4bMRaNob/3prFrEOdVVRJWkcis0/ec rbUFJU5IbMY5f/EdtDglLkXdPx1S9Sk= ARC-Authentication-Results: i=2; imf14.hostedemail.com; dkim=pass header.d=eideticcom.onmicrosoft.com header.s=selector2-eideticcom-onmicrosoft-com header.b=e2SwepBc; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf14.hostedemail.com: domain of Martin.Oliveira@eideticom.com designates 40.107.212.134 as permitted sender) smtp.mailfrom=Martin.Oliveira@eideticom.com; dmarc=none ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NBth5Ki4owJPn3df35ss6Ii+bPwPaxuWZ0/HzNxtUcyTNKtx2i9jvJTtsxtSOnVg5soj7HmRcUmOoKI58b8g8fCALXKeu8W5M220hf+BbQc346Ey1gFMIXnRA5+4ul6iyMC8TiyEA8bUSu+/nRs/5JhrU3oDo+D/Xu2+6jHd703ePSqEE3qFeT1YldytyWqjHfu9SC4MHaxBo6IGme4FMbaCp+ni2Ec4+EZDxlujv/uNi3Pipr62R/iqqppCNdponJkDajtJ9SSPskkFtzeHyWCcKdXo5jW2IdfugqifTqluExZCmRpuQDWdYaVQNDuaymHlvtGMMOLPi2p+gULyyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=kM+81ayAtTLFvHOakRNJe8YX626jXBDowTU0GcX7MMs=; b=KSt+7Lrr4HdS52FAwBYoARjzYMD+ITrvFDRbm+qgJ+GWmT2uKQDqxVXFHqCPMK3rdbXytompydINjhxZ6UZYPqNCvlOlcH/gucQ64NBvwNyOFIPdjY07GixIDOd8cencQ0oeS6jTSvpvwR/2fCBD/LCmyINAplfT02+P5r4t11q1arDqRfpXBek4irN1yI70+4QmsAMGhV/bwFurryZHd4cY7ijn/WZGk/81qhfKyzvIxSLCEHrA47Uo70Mb5LbwTI2yIEqscLMCbZ8l6S5ddmMsDu8RGChKxP5O0Q8gDBQ0FJVEw+eQ/uRI+78l+fSIxsQsulGWztgRYyN+UbqurA== 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=kM+81ayAtTLFvHOakRNJe8YX626jXBDowTU0GcX7MMs=; b=e2SwepBcGIAeoOtAr5+TT22sQVWqBlEhAtqG2Xlw8Wd/7rP88eF5Zkf4VLHj/niPnqnuVL0eECSrdW5eeAPxuWmza4w6ZXk+boqyzpQIBfqj6fG2lvrOjq/nGGdXNFF6bXZIzi/m4Gq17fAVLUolWycEWTqh2BTfZp77KfYX+/E= Received: from PH7PR19MB6828.namprd19.prod.outlook.com (2603:10b6:510:1ba::20) by IA1PR19MB6348.namprd19.prod.outlook.com (2603:10b6:208:3e4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.14; Thu, 8 Aug 2024 18:33:56 +0000 Received: from PH7PR19MB6828.namprd19.prod.outlook.com ([fe80::69c8:bdb9:b882:b849]) by PH7PR19MB6828.namprd19.prod.outlook.com ([fe80::69c8:bdb9:b882:b849%3]) with mapi id 15.20.7828.023; Thu, 8 Aug 2024 18:33:56 +0000 From: Martin Oliveira <martin.oliveira@eideticom.com> To: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Andrew Morton <akpm@linux-foundation.org>, Artemy Kovalyov <artemyko@nvidia.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>, Logan Gunthorpe <logang@deltatee.com>, Michael Guralnik <michaelgur@nvidia.com>, Mike Marciniszyn <mike.marciniszyn@intel.com>, Shiraz Saleem <shiraz.saleem@intel.com>, Tejun Heo <tj@kernel.org>, John Hubbard <jhubbard@nvidia.com>, Dan Williams <dan.j.williams@intel.com>, David Sloan <david.sloan@eideticom.com>, Martin Oliveira <martin.oliveira@eideticom.com>, Jason Gunthorpe <jgg@nvidia.com> Subject: [PATCH v5 4/4] RDMA/umem: add support for P2P RDMA Date: Thu, 8 Aug 2024 12:33:40 -0600 Message-ID: <20240808183340.483468-5-martin.oliveira@eideticom.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240808183340.483468-1-martin.oliveira@eideticom.com> References: <20240808183340.483468-1-martin.oliveira@eideticom.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4PR04CA0072.namprd04.prod.outlook.com (2603:10b6:303:6b::17) To PH7PR19MB6828.namprd19.prod.outlook.com (2603:10b6:510:1ba::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR19MB6828:EE_|IA1PR19MB6348:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d2d9e41-c152-4c08-bca9-08dcb7d8a921 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|7416014|38350700014; X-Microsoft-Antispam-Message-Info: u2cO1CvDeX53TNI81bLQDi5hhFhenPl1bOdoE+Px+QRPX/ekjgYjS1XXUgMPyPGPnblBBotJsrvotqu2B0CuVvSknWM5aGfG3bXRqkm9ahCSsLwl+jKJNIv4b7EiSuTe6YJa+/9ZkmZ5w7eGoyh/9Ysh+12kWNyfvbW3QWLXP3NRorGhMoRhsofWXfpiBQlyeRQPS0uefRJ73PoRiv0NC4fdG6HIbk31h9YseLQC0DcX+mjS6W+atGXtizyTFVRJhrRkmVUw0UgOUySp5LuymMq0lYtOcQYLC5Qr6I4bH0iLbFyGutkiDIO0yg3o1k1lKnIuTHWOTmVKuRSU9hhaNeZoOjybWNq506XCoPECPOTJV1Fm4xxsssi+pLxk0gxFJPNnnwT4vuGKH1TW7PmPQnJZmoFDrOXCn7FMC2n3CvOBHmBLitlZY84WqiJlPhnuEUFCyfuGbHbPT50w7dteiSgiO3+2ma9Bw3KP7autFN9mltQ/N1DZYkX7B5DemeSLFYrTnV7gFjFveAm+J5KFBK5yZX0JmjBU121dafUItrhZ/Xv4iwhZtdem4GVcrDkawHOiLhgn0/jbUDkDdG4vrLxNFZV7oIMDOzFju2YFiTLNuRw5C7yXzGX3vP/SacSYF+ykczDCZOy4/Tl6UU2320lUh7VHgEqYvOpMFPjuC8JPt2v6y80VbcIfyXT2jdVmxV/kcOzgCUV2FGXOo9BZgP2dTaAy0ZYoREBe12zWNc3sNtU/GW1DTpHDbz/sKR5Hh7jPwr7bJSh/NYDYEhPLKssrJVcbv0hQ3MLY0SqeY9KvclIR5IhGDezW7oVIKa3uWObmIFeFBVn5bzqdrMbFjJjc6b2yRBL4YTTIS4UclkOtt/+HGlqMgfsxIEXeap95m41qr6stUA8IAB3tNfn66UnMOI48ztOtHdcRZ+HJguC7DolInmAC+OBAtRihe2Tna/0K94mDmm/jZJApFN0MwERTkaA1ZH3hmv7aOJMu5Eg74xVipUH328Jp+52XPVCr3iqRMI1K4wYV4oJdU+rh6e+NAbojAxOJDaqqCLjGUe5olX3cL+S9XA6IIzf0Je6mGHqSzMOTSLNqrjY02DVptpFJXST8YlpcsEAsZmEtFDMS36sRHdTRDmxaL2krZ3z5waeM961RSjE6nH45lS2NYilCPpHbt8gfhQ3UOk5ANq/0MdQHh/+Xd0FwW79ak+j6PijiPIMwZoV9AQSoDVggn7oQP9KilYtxZwuAm3yOjqXuUtXdCif/RoK5Of0qPLKE7ahaOKIeHjmXTZ8OHDgcYrg++6KOQ05BnMufMW4bAk0NQ+zDsNVZEbmXpep/WxkRhMmaNlPwLdbOgBlsyO+o42TA+OJC0oFfVlCotn5gD1hHNKzHMQPn/u3Jz4xQR1iNCyDUA+yACdTkT8cJVEhPJQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR19MB6828.namprd19.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(52116014)(7416014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: G4AoJDchhPfOk7tlSGE+qTcMOCpjdP7Xnb/Ya163wV96hJhOuQ4njF04LzQY0okOFa/8qzb8mIMAASVI0ZZexqkveh3hbkukW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h4CXPCNqGzfYIGbEACSQQxtyqjsyCUJgyCtYT5si12aqO4i5ZmuxKJOuLSnbPPU+03Jc77nM+tOQAPYAcHmy9BPF6Xfn9NeeybEQePp4JFdkDi5vOpd9XjGv8nxtRBxvT9msususAi5244m/1gsjwyUigqaffjkGS7QOFCjWROGzJx7aIRW2Xskc8H3WVJPzqptVlrqRek8O76CjA6+m2xVRTPIzncBu+rcyNV2wlP5BWpc88eSXehX4zgrqhnLEpiha1uYBiNlH1OGNCGqHVg0s2dm4KsKhAYVPguX813EtajbmlUMm8tHfEnvgrS2XEQV0dBarPHwBf1UD/0W4h6aJp2TLzKOzbRiyZSTNte8ronjjfofMS4x9qVA9+n8WAuzmITZsPM0WIwr/24YJWlsxyUmYuxXwA4bOJthPgJTXskQY6Vmf0zPWmSDn4MCK8D5Nv5GXHZo= X-OriginatorOrg: eideticom.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d2d9e41-c152-4c08-bca9-08dcb7d8a921 X-MS-Exchange-CrossTenant-AuthSource: PH7PR19MB6828.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2024 18:33:55.9963 (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: iJqWVk+jsUd30CvrPYOdskSZeE5/eHtjjUITK6vp0O5ci4VQ+p6gWPPq8kOij49aDmNnHSzLseG7Gn1NYZt9lq9l7Q5fB22DFTlRjAw4fGY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR19MB6348 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 64BC9100023 X-Stat-Signature: ah5emro5kp9gmdpkjbswmestx8en7u4x X-HE-Tag: 1723142122-42279 X-HE-Meta: U2FsdGVkX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LA2LzhYBucTgB86x6MZd2OftnOXKcKWrifJKHAh75xv5NXUDJKqIZUG9Ao45vTPsQSpEWOffYHS7wrMVHVjV3ONcx5LedXl36DNLSqhfyG97Ux5afHiW5InrFM39ZVTe9dBs+Fi80kvHfdmhYncH4oEIAaVUvLhAqSQ2VXNLeoQ4rQXqvocPjG7kvsqNYE93cEKG4Rv1yt92Uuj7weZPL3mbBBC+Wbjt6T8zuB7Ek9x90uL3H9lLNOIyUYr4t1rWkP3n17PBCmJVBVH/tIIwry4+QtD2cVbrUOablfd/tVR7R7OvUxzRWmC370id6fmsksMvIRwDiFP/z2PqPAIvmgjK5f2TWm1guIzL0b9fmIsbgr 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 07c571c7b699..b59bb6e1475e 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,