Message ID | 20241201103659.420677-4-ymaman@nvidia.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 02C41D49767 for <linux-mm@archiver.kernel.org>; Sun, 1 Dec 2024 10:38:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 533466B008C; Sun, 1 Dec 2024 05:38:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4E3346B0092; Sun, 1 Dec 2024 05:38:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35C9F6B0093; Sun, 1 Dec 2024 05:38:24 -0500 (EST) 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 193DC6B008C for <linux-mm@kvack.org>; Sun, 1 Dec 2024 05:38:24 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 87F87C0A94 for <linux-mm@kvack.org>; Sun, 1 Dec 2024 10:38:23 +0000 (UTC) X-FDA: 82846040676.16.7D18B7C Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2072.outbound.protection.outlook.com [40.107.93.72]) by imf04.hostedemail.com (Postfix) with ESMTP id ACE3F4029E for <linux-mm@kvack.org>; Sun, 1 Dec 2024 10:38:08 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=NclyeTDx; spf=pass (imf04.hostedemail.com: domain of ymaman@nvidia.com designates 40.107.93.72 as permitted sender) smtp.mailfrom=ymaman@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733049488; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=kbyg+LGFlJ8ejF7f5+c17QNDW/EF3rYADtqdJApzx3s=; b=icP4+onZV8oEILRf8sI2+AM/8AX51jTktOKSduLQ0Dy2CjZnHmpqVyJfhhHN/CxYfOQlyA hBGIkH1WfbvsG4GtGeCbr8dBo7t42cWFEI+LOiZ2/+v5TgelUAO/pyv8IYDkF/09l/dhjS wk0o/LMYxjPwocurxqhq2EuEblG3TYk= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=NclyeTDx; spf=pass (imf04.hostedemail.com: domain of ymaman@nvidia.com designates 40.107.93.72 as permitted sender) smtp.mailfrom=ymaman@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1733049488; a=rsa-sha256; cv=pass; b=p8N3XdouoxgjHVM7pfakMnLT87/Skvv+Rqh6tgMSAXoaQL+Ov4zS6S0+30MFuNFlspfSlq IQnARMxROzGQWbZsJLz/CPu5ahHZcYLuZs6MdkNVJVOlOaDzsmb6KEhKr5OKs3gmcgNCLl BHewA6beDkiAeQJuMGp4tVvBRtiEP98= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=coZf6enY2JBnvm4OLwRB7JgceBNOiI7U4xaMYBAHGjNDFlnLZlSCmoy+2dcG3QU6FudTnxDYKuWKufl75C9YfUFYgyS2flpFJVQXjNmadWff0d4ULmQcu+5uawAlMDL9WXLEkuD94UeMoDqmPwvPvbUyUR1WK7dv/tHePIKVL3x+bsjBNyfbqCQ0mXFgOcN39aA8TPydA7rCY7rb/h24Hg0+S5lohqqYrXby4rOUescTlkOeXXMC5ynkECPE86nrZAA96vQcmwjDCZyMVAUi+MEMiTq4pOwGQdDt4dWByBYSbIz/1mCRTwVtt+g31KpskCLuIJBCCJde8sSb4aWX/w== 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=kbyg+LGFlJ8ejF7f5+c17QNDW/EF3rYADtqdJApzx3s=; b=e4gOfd70LeeZyPKSvZN9NvGgdfezc6iG51jm+X/e6bq3wz29elY0UaFJbJ4HXzn2UCkLjPKlRXfd61zV4V1OUrBTvp3rMVHi8hcG0Coxc7xjh0i7VXzjChYhyyycmWO2Ypg0d4yQ+FNnpqm9jmBhh6bQnp+Pw18T1dCS5bNA2KWEHK8bvMHS3omTCLLTYmQc8pQwkLLnZ4YAZVNPdPjVEadfFKO17c7xjCc1mvDMFwaOejxysxEwYoHtu3THPA3+O25nLJ00rNaQ7oS/b6BcIkOp4tm7g/4nlhd6QPW9bTflaLHfczUJWiSKYfgsHHR7iPLVwc0dAnjAvXsmjJMtcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kbyg+LGFlJ8ejF7f5+c17QNDW/EF3rYADtqdJApzx3s=; b=NclyeTDxNisNJmR9xwDac4qKn+fI9eC2DdkCOQpcty40fxUri1vd3LV1olE8n4QvKQanJVU/LDZ5CRH+sjbDc7uy1SvGSQPpQRf3dbTTTC2ZncgmTS6sF63Qptc0YPTQmjlR52aEcm+CguSZCVSUM9xJVEB3KX+7ltsgQWzWgB7ndk7C/cQVW091kw/qAO/CwABlFd2T9lW3c+KaxLOZdV4Nzh0wFt+gDLGuJZ4p8FAEV9HhBBDYBE1j6mxQU+53bjNw58htgjVBue/JgncyTi1JVhhYUjHOiIMuilcTSh39Lbazpl71/CMQEDVwFzLKB0kylRDgDcKRmKwNSgu+rg== Received: from BLAPR03CA0051.namprd03.prod.outlook.com (2603:10b6:208:32d::26) by IA1PR12MB7688.namprd12.prod.outlook.com (2603:10b6:208:420::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.15; Sun, 1 Dec 2024 10:38:16 +0000 Received: from BL02EPF0001A0FA.namprd03.prod.outlook.com (2603:10b6:208:32d:cafe::57) by BLAPR03CA0051.outlook.office365.com (2603:10b6:208:32d::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.16 via Frontend Transport; Sun, 1 Dec 2024 10:38:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by BL02EPF0001A0FA.mail.protection.outlook.com (10.167.242.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.7 via Frontend Transport; Sun, 1 Dec 2024 10:38:16 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 1 Dec 2024 02:38:06 -0800 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 1 Dec 2024 02:38:06 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Sun, 1 Dec 2024 02:38:02 -0800 From: Yonatan Maman <ymaman@nvidia.com> To: <kherbst@redhat.com>, <lyude@redhat.com>, <dakr@redhat.com>, <airlied@gmail.com>, <simona@ffwll.ch>, <jgg@ziepe.ca>, <leon@kernel.org>, <jglisse@redhat.com>, <akpm@linux-foundation.org>, <Ymaman@Nvidia.com>, <GalShalom@Nvidia.com>, <dri-devel@lists.freedesktop.org>, <nouveau@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>, <linux-rdma@vger.kernel.org>, <linux-mm@kvack.org>, <linux-tegra@vger.kernel.org> Subject: [RFC 3/5] IB/core: P2P DMA for device private pages Date: Sun, 1 Dec 2024 12:36:57 +0200 Message-ID: <20241201103659.420677-4-ymaman@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241201103659.420677-1-ymaman@nvidia.com> References: <20241201103659.420677-1-ymaman@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A0FA:EE_|IA1PR12MB7688:EE_ X-MS-Office365-Filtering-Correlation-Id: ad54d123-a9c9-4cc4-275a-08dd11f443c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|82310400026|1800799024|36860700013|921020; X-Microsoft-Antispam-Message-Info: KZmezP+Wq3JGWwEB6N2WfTCFWHXrLwv6y4ywRh7UDxP1riQyHowo0PqAEKLNgkvKmbu7GXRKLQOLbYdmny38oYZjVTmGWWfICCTb7xFQmtziftdTch5u9//dHUqYpFlG3Wmj2SKp2fabhu5Rf47KRSWos9iYi+QHlsPNSYrE/m2HtMhcjZVFlTkvbcEcZ49KhFZyC5u3blC3tQhHarQdfbArMDq2DN+XqUUyq8Ph6Jcr470VsxuiD3FB4J4TtFPNhCI56HyzBF52Ks+FpEREKeto+ItnWsA2Oa884y0d/zsNiejgvcgE8CAnVPIBEHRy2NICJ3EC1Z8aXHwktsHbYn2iMIg32NmYUR/xPjY9mbAePwr/WoHkZnU8y+odqIUsy/epypEPqh123pLnw4GmPZEbLIa+3jUe9GaJbUgfRBWxWCW9k8xmd660o+jt8yQJLAQmb/fxG7nEp7QQLpPCbmclIFEkIFXpJp/jMMFmmv63aHkjAACwtIrbGSDUpJFHCPWBe8eSr9qk7N2U6TB4MAGwqq4Z3BRCwQzZRdsVku+yvQ/ooqEa1ukT96ontW0U6ONKkkt41v8KbnEX5a9VsPHJTuNn2F4/T3sKRbbGimdGDHQAMmkvwtIDZGSBRSdgzbvNnlHMSVhteiQwcLYYBvWD9eNyI+a6IBf3jzl4DJNookWHeOOQQWWMgxeBZskaJjgqrd1IB+QB6P2XBWo1POzLuJ67VQMKp7pAwL/QLJ3GUB+5W4YWBytOMamvWPjamGL68mVzw0eBB8K6/G1GKhWQuOc0UXf47SfDN1XhWms3wGASdVzSXgqsWMYQ0mtHaL5XqY9xBXyyQI58le43hx+8XfWDSGJvAX47B6+DItbrjugC8KTKDpz7R4DdFnddtVBqHfgDLV2oG7WzCPDc1zuFvBdxJ7dk8IOX3rxKYdOHlbkOOS1cZXCr+AAuLnkeLToXDOwLuVASYPxmq6/5LYtpFirYtaHsXnx6nFEcobnel2JXnRv4zUyMDWFCEn2684DiFv40aSZ1ns71shiHfxQDWjvaLnrst1SobrkjUOeLRfnzW4wn5K8IjGtovmhS839NstxI0/gxlXjCHODaqblTBVKtXLJPSJB7oX19XUR+ebj9t4ycxqYBotFhKQ3LBifRuE71Cw2PVC7Bs4YF8jiIfIqqkb/WafICTe0HIco8D71BXms9vLPeC9qIwC0lUaAJ8TC1UQxAeQIFRvE//JcJUY8QBAdmF9LVMySen1fVcTWdLdzZAndu60Irp8XKfC841fsIKFjh5y3eyGVv9VKm2+PHRlQkWQmJyvkMrA8q3LzO9RSAj9wQqfO2Ptv339a4A1jJ0CNOuqDbQEoAgWaSoDdlsX9RhHb3tkhmvCTJOk9mIVQAePaID/mbywlkVM2ssdWRrmjeUroF+m9DZKRTxEw2uDhiIzdU9EUyJBFKIFt9YtQ1J7yquiKICbIwpyaO987Y7hwwoNWdaU6P4A== X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(7416014)(82310400026)(1800799024)(36860700013)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2024 10:38:16.1486 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad54d123-a9c9-4cc4-275a-08dd11f443c8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A0FA.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7688 X-Rspamd-Server: rspam06 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 7AW7fziS glaUPUGHGZU+LlQPbl6ZQvG0gyYK1227p5M/Q0dBwKESXBE/eu1HTvWFqaei5NZtKeRLr/HOXSC6wc3IhygFTeCSqOx5pISEu+ggTQN/1EcccN8zEsnWLyFXRzoGtE7d00S+lHOG+u3Sp1Qjb/ydXRvj0l3ZQn3yNVhbuxq7RIuoLCbDyScJXmp/8TMQR6etZbeJ0c33L2lu6+/JmTdg7/wGN/CSO5qLaybTwq7VPRzFs71aTWShVsLiJQmW6g3xgEEo5GbKjxIsAdEKUsrKlSC/7q/Jnaj6m45Wl0t1PDP8rJhDmsQMAanMXxou+pi0Scl2iM9yQpjE/Ut8xASdgbERgigb17Sts/9ZnY8hZnSAS7sQh4s6eStdJXo9M3epF6KQN 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 |
GPU Direct RDMA (P2P DMA) for Device Private Pages
|
expand
|
diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c index 51d518989914..4c2465b9bdda 100644 --- a/drivers/infiniband/core/umem_odp.c +++ b/drivers/infiniband/core/umem_odp.c @@ -332,6 +332,10 @@ int ib_umem_odp_map_dma_and_lock(struct ib_umem_odp *umem_odp, u64 user_virt, range.default_flags |= HMM_PFN_REQ_WRITE; } + if (access_mask & HMM_PFN_ALLOW_P2P) + range.default_flags |= HMM_PFN_ALLOW_P2P; + + range.pfn_flags_mask = HMM_PFN_ALLOW_P2P; range.hmm_pfns = &(umem_odp->map.pfn_list[pfn_start_idx]); timeout = jiffies + msecs_to_jiffies(HMM_RANGE_DEFAULT_TIMEOUT);