Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757054AbcKWR25 (ORCPT ); Wed, 23 Nov 2016 12:28:57 -0500 Received: from mail-sn1nam01on0051.outbound.protection.outlook.com ([104.47.32.51]:1281 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756780AbcKWR17 (ORCPT ); Wed, 23 Nov 2016 12:27:59 -0500 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:4095;Count:19 X-AuditID: 0ac94371-72fff70000000ee3-60-5835cfd520ef Subject: Re: Enabling peer to peer device transactions for PCIe devices To: Logan Gunthorpe , Serguei Sagalovitch , Dan Williams , "Deucher, Alexander" References: <75a1f44f-c495-7d1e-7e1c-17e89555edba@amd.com> <45c6e878-bece-7987-aee7-0e940044158c@deltatee.com> CC: "linux-nvdimm@lists.01.org" , "linux-rdma@vger.kernel.org" , "linux-pci@vger.kernel.org" , "Kuehling, Felix" , "Bridgman, John" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Koenig, Christian" , "Sander, Ben" , "Suthikulpanit, Suravee" , "Blinzer, Paul" , "Linux-media@vger.kernel.org" From: Bart Van Assche Message-ID: Date: Wed, 23 Nov 2016 09:27:42 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <45c6e878-bece-7987-aee7-0e940044158c@deltatee.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMIsWRmVeSWpSXmKPExsXCddJ5ke7186YRBs9vyFhMu7Ob1eJH53U2 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iXcwNjKtZuxg5OSQETCQmH1/A3sXIxSEksJhRYu7p C0wgCWEBd4mWfy2MIAkRgb2MErPvPoKq6mKSWLfwPTtIFbPAJFaJAz/8QGw2ASOJb+9nsnQx cnDwCthJLJklARJmEVCVuHbsKBuILSoQIbHp6xwWEJtXQFDi5MwnYDangIPE5wPz2CBG2krc mbubGcKWl9j+dg7zBEa+WUhaZiEpm4WkbAEj8ypGsdzMnOLc9MwCQ0O94sS8lMzibL3k/NxN jODo4Izcwfh0ovkhRiYOTqkGxumHmUReqNj+a3e4WCnnFJVeo9l2K0jXvN9HmHFfKOvr4GMO 8dZ9oc8nSq2fZ7JoXsp0dr0LL4peC1/NeaJ2ytHv6dPtf11dV5ecPhbnOidye+rVx/ONlApS z3i47F8vuD5nk/9dW60JzWcvCk7K2819vaVcaP8GWYPjzNGuLj88RDLuZdR6KbEUZyQaajEX FScCAKXoiLk+AgAA X-IncomingHeaderCount: 19 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(189002)(24454002)(199003)(377454003)(106466001)(64126003)(86362001)(31696002)(69596002)(38730400001)(2270400002)(23746002)(4001350100001)(4326007)(97736004)(5001770100001)(33646002)(230700001)(53416004)(31686004)(93886004)(65826007)(356003)(551934003)(50986999)(54356999)(5660300001)(76176999)(7846002)(36756003)(6666003)(2950100002)(8666005)(229853002)(7416002)(305945005)(626004)(8676002)(2906002)(50466002)(68736007)(92566002)(189998001)(65956001)(77096005)(8936002)(83506001)(81156014)(81166006)(47776003)(65806001)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR02MB2850;H:milsmgep14.sandisk.com;FPR:;SPF:Pass;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD030;1:783B5afa2bVc2awODP9pBUGvH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ation-Id: bfa63427-a09a-4ba0-83d9-08d413c60b04 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:BN6PR02MB2850; X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2850;25:UFgJHrh5Mdswt15E87HWPFlWygOfeIThJQiFW3BSWc1H9c7vbbJqs20lepg0c9uOMUQ3dOPjz2v03lfcXv3QXH7kTHO5jvjOYaiVRsKBr5T/GZ4tV0Dl4PWA0Bffa0mifGUdiF2W8JZg3ieKLf7Xt74FeZ2zUQCF1A9JDcv3EFOxx3DbKeLd2pWR9eZbsh+f78nJudn32JXs58S2NrRWz88C0gsoNoiYTxPXXxaw1Wupk5I758ci1szxB9i1TO/dit1pHyrtU5X0Ip9qhWdl4RkLSGuXSE1PMsvji26DhFxdMsx//diKxnqJFOCoy1bnUF4d00co8gy5dNRQNzgh9i0uQiVe2fBNYsl+/gz8vZsYZEMKN3LdjfqMtCYje4552JZl38j0DxuX1rJeQ0htvh+oqyglYydVhCwJ3LiZGUaZ2uG3V5M8q7o+/xpDtKF0IdSO5K2o/owt/Oyyf1gzfA==;31:R56iQu6OHOg5ebwOUHDTDvbBmnYvBJcPOtp16gzbzZMG2KzJPvVqYwadZh5I7HP4w7GRFfpQOIQ3KnIauoB11TgUmfmhGjbPxuwDHNj59HX0LLKO6rCFKqjmSWTIXR6IGIeNq+v25R1vEzSa8eoLc8zUfbL546kefD6DxeGyKVbvcP933x1fX6IbW2O41UX48A73flcPydi1EeN01pWjfwSb7K3URenKBdVp9eG66LbQeq5OxJqHK8cL4Ojvg5u9l4Vc3tN6JHXTFdMVKacJgg== X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2850;20:dV8zqJVCmxaxq3hI+RkYIjeF2KW7VbgDq8XGSNMtHxoOmd9NzP/5qX2eU197pgiRYUcRvS4qWr4Mzf6BvfAMD6hPxNwKQoahnhHWhv6Et2DbnCYMts77JVwzpjOv7flp3Wu0+F32AQEqrTEILsBN5ft0CC5ukyAoVU369PmvHYsGfH/LXiFWQ0hnikH3KD0iOQZuOz5Qu/CRphaqsxAQp/+vKTX1vczQOjSpRQ9EUraa9RF76Q3HFzjR3rGcVIlepCu1z1bfpmspbY48fzmzXFdTivbDYumtqfJ5eybNkAYWiaeyLGvQl1teWra8hj7A9puWN4AeXPhaGYUQIsZGvRfCyqH/rz8fE6in1i37JkS6pb4NGabimjNj+hvzaBAFAHvfbbE0YzMJELz5KkBwPVdrfoHFZk18NqiFey86PIf0bW4Gt00OcVVm0zRC7l2Lp9bIEkwmZvym/XDM19O9a6N+T8YaRPVGiVHB1NwPgIfpU+wi8CFr4ICBcImGnpHx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060326)(6040307)(6045199)(601004)(2401047)(13016025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(6061324);SRVR:BN6PR02MB2850;BCL:0;PCL:0;RULEID:;SRVR:BN6PR02MB2850; X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2850;4:gu5lWAUW7e0CfQ2fU3rd5Q+3eH8W977VTlSrIzwQ9rG19Rj0dJhFoKvuEZwpfeCP51rIHaLUsuJiJ0mkQXeSvvZE7sfiQqWn39mloVUKE6QVHTyScPvNgaBkIVWV+oVKa8RV1HF2vb8ztB4E/k45JndQH8GMuB63mWBfVMpZYM29Ga6CteYMjaU8wXLZg0QsZ9HfoX1laybG2k+uBXce4O0ZGzhXcI1LlbWi+UeM3nRLrL9z1A7lETXi1ZftcVo0zi5m3jTw0D3qmxZT6u/MxxIB9uS+/p1EA+BHxY7oxoZnZDZekiwIefcOfVVM3mTGRrbAJmXnledGoz9wZkbNdwnKI3CaZ/D33hJQ/loYJ0FstJ62PGAk49siF8K0SQg45RDXx3M1W24xrg8+erl3QR5z5u8A8HQJr9hVqZ3XmaBV2m96SAsDQYpX/OmZIwdXLSWO/5oh6W4udXc/tplpuwud2gFxrwQNnG9zP7IKn94lQeCScKFBfWKrxFSPDjbhh9Iozn9dZTvnNK8GrhmOpA== X-Forefront-PRVS: 013568035E X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BN6PR02MB2850;23:fRnJ94yq3ml3GYrXKnh7apGrx5xDaMKebqPD1?= =?Windows-1252?Q?1/9JBYdrYiaMQ+vMjjkC2VbfcPXWNzZhRtH5/IACcfL1AIYYvcEo2//l?= =?Windows-1252?Q?q+SZHCnk/2K2fkDP5HjnUrcXQLvc0HKbWVqmMl8WXFbUki1E/RePODJx?= =?Windows-1252?Q?ccMZGoabLrM77lJQfheJzxnQNElkFZXJhISZg5GfZZ+A+4W8XgezbyLf?= =?Windows-1252?Q?i8aLHG5yKA0F6pTgHW1iYClsxcz1PLl6Ihsv89txGdq1quV7Qcj74Nhp?= =?Windows-1252?Q?UZrA5NaUkqLi2H6F0e4+LIZGtN1EtZbDG8JPZZjf3YDfgSwPClsRhEtc?= =?Windows-1252?Q?C7STdj7AZuaFmWkHrbG2aSnYSG951OVOXEUngAmVF2TYu0nGDh2gS4Uy?= =?Windows-1252?Q?NAIJQmfHG6RYs/Xp/d8u5SokidVidDFE7NmUP3rkH1S/JNasQHzfSMp8?= =?Windows-1252?Q?b4cD4+7BeK9yx8b6TR9Ojq4HLPIY5LUVLdZGWI8WhhKFA0L4OW+35GZC?= =?Windows-1252?Q?m2vBtmKC5qOteeGZTJ5fdnmi0/0PutMkKoGEc3hKLXUKi3nBll7tboq6?= =?Windows-1252?Q?EgPYCMY4ohpjeigzCuzb5lNpPA1v5u82haBabxky0R+QySYxHYV9Z4FE?= =?Windows-1252?Q?eWRyMlAOrJ9a2N8tZrKFmqkyP5u74MYsHNApc+kAEf7GdHMjMaBk2uwV?= =?Windows-1252?Q?CFhp9LasFNmANfVdaGT0QZYSXyCXKH6ja1X2e9VsrPJg9aBoGudneOOy?= =?Windows-1252?Q?utFQWfaqAginTo4J0fgutxa8yYdV9tvvK10JAuVw9X4jEnOFWWmCMpFm?= =?Windows-1252?Q?7H12hLh2BQDt5Sp5FUwNBvPwKSAEyGOswkOk8BhWnz8ZuvSov3IMREj/?= =?Windows-1252?Q?Fh8d9tRyiCV4b6TJmS8jf4ChJLkFHbw+gNU6QQfwOKDTXomuVSv+6WVE?= =?Windows-1252?Q?Sb19OmaBliKV8RN04s2hkHLCMfrFEjcmZX713COGflEoZh05pSOH2jQM?= =?Windows-1252?Q?CYwUVZPqQpzjxXXmWu9E1unCurEJyb+TloEGU0us7W1q8p7BFg2lB4fg?= =?Windows-1252?Q?9QoGQBBx0Fdvjm3UeTWYLbXs8+TO00WS3rQU4AYnCNa+WDHR/EIxUWgn?= =?Windows-1252?Q?8O7G+0Z4L6K03I2Mi3s9n/dQFsOT8qfYovNPExD+rZ638Ht+7GWUtzrc?= =?Windows-1252?Q?9nYQzXn4gbFrG+9j2BGazGN5zkim0Fn7d5TEqzOrBUO82TRfD3U5uL4Q?= =?Windows-1252?Q?+L37UqBJKkRNe4ef8Z2o2/3fe3cGo4aB2GE2xjwi/xrzvwv0Qs7urnMk?= =?Windows-1252?Q?V+uZ5z7pDD9hry6+W5+yCyQ/Os+p0nZ4MIqPgdXubQWyJ+B8akxjjVqI?= =?Windows-1252?Q?fYK3MFg/57sp6tH2PXVJy6cQ6eBoVq/YPfXKLlkq532SuVqIbuEhrl7y?= =?Windows-1252?Q?c8nMKfn3MRfMaMWRlYs?= X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2850;6:bwqL5I+BzFkxu0EjdBTQAMQLD4tH6gLd6QCJ7L6sOURKzQ+yu1GOBOhqLa+tv4O9hN/YD04hO/aJ2mfXBqG3QN5bT9mHQIkWRZN1zzH95/BCZTg9fHf9wKVVw5z6Qn1bJPG81IPCcMQOKewZVRbjKGqaLCuwAUcSFX56z4I5yIUvahFLJlRa24hx0e3uFiq7ewRf316lqDSHCi5cHogI2ARcRBpllGvbQB/dXOTi54t7i6GvXdCHkwETWPYLUCE1YAnnH4thW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QIIaA/TOWXD93 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2016 17:27:47.3820 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d;Ip=[63.163.107.225];Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB2850 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 817 Lines: 16 On 11/23/2016 09:13 AM, Logan Gunthorpe wrote: > IMO any memory that has been registered for a P2P transaction should be > locked from being evicted. So if there's a get_user_pages call it needs > to be pinned until the put_page. The main issue being with the RDMA > case: handling an eviction when a chunk of memory has been registered as > an MR would be very tricky. The MR may be relied upon by another host > and the kernel would have to inform user-space the MR was invalid then > user-space would have to tell the remote application. Hello Logan, Are you aware that the Linux kernel already supports ODP (On Demand Paging)? See also the output of git grep -nHi on.demand.paging. See also https://www.openfabrics.org/images/eventpresos/workshops2014/DevWorkshop/presos/Tuesday/pdf/04_ODP_update.pdf. Bart.