Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934190AbcKWTXO (ORCPT ); Wed, 23 Nov 2016 14:23:14 -0500 Received: from mail-co1nam03on0047.outbound.protection.outlook.com ([104.47.40.47]:63481 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933035AbcKWTXK (ORCPT ); Wed, 23 Nov 2016 14:23:10 -0500 X-Greylist: delayed 85746 seconds by postgrey-1.27 at vger.kernel.org; Wed, 23 Nov 2016 14:23:10 EST Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Serguei.Sagalovitch@amd.com; Subject: Re: Enabling peer to peer device transactions for PCIe devices To: Bart Van Assche , Logan Gunthorpe , 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: Serguei Sagalovitch Message-ID: <09c49114-914e-8257-746d-71e39d34b103@amd.com> Date: Wed, 23 Nov 2016 14:06:34 -0500 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: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: BLUPR16CA0069.namprd16.prod.outlook.com (10.162.86.37) To BY2PR12MB0695.namprd12.prod.outlook.com (10.163.113.17) X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0695;2:mM2OEuFvus2BB59F2VFjgUMkvQUASjg6ybNqOqWilSAPrBCNhnM+PsGrd0gsVth3FHdO4GKb3f7WeNLRu439Ip4EOTkXczs4ejsMxPUEdXaWdQQ4cP6IU0GG/BPaAyMRgRY2/e4GUjo+MXhjpqQx1QU0VIZLswx69/kR66M2eeI=;3:MsGJBhnbeUkJ9uKhqF5N/vJxLDSK2tjreEV2DS36iSw2uzlNqLGIWkrImpXshuvF/yIg9NdMXFQwIq+PNigHVSyZLQr3lepFeir2/74izYTW29tlHPb8N1fTkg8wymryWsj6+JesiqtsEt/dBlSInjG3rXQkwwsToiEWlVtu+dU=;25:zWuRqsiEzduxmAqux+VwkskIlUEnRBn7XWlITFStgbUrfVvPpdiFOa/U7crPk6MnZp+mJRt01jddq2SBf1shz8aVLrspr4dCO4Boszusdi8ZroZOPieYw/JGlm6pljy1sdGRWhufnQkcGinZc4Fm7ZHbsClk8nmcQOqJY382iZ6Sp0wtbY4rg0FGLeT8QiRheEec+32PISks9zkVTg04pdD8clnP4Lo6GzqfI/jG8ESX59YSzNgPK9PJS75eQXePmSQ2MIaddBXoO78hDzOwWcgH7O/EjdCNJCcZYRX5GL8FDE4c8CAE86PI5ZNt3mA3YMAkKYpYwwPxMz/E6tT2Rdg5xyXOhm6mycfaMTMsWnvmNce3N1hOaHPEjXZDHZIn7Y2etAYMgeNA935AHB7HHIrjijXGMnSEPubfERXnT4Q2ropM5peOMLfTof3wsuUdPuD/p1W2gTs2zQR0toVuXQ== X-MS-Office365-Filtering-Correlation-Id: 04d8e9e3-b842-49f3-1f4f-08d413d3de02 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BY2PR12MB0695; X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0695;31:LJknj/LZVuQ0FWJclvuzaEO00AAaJvhN7omVOjbwaZ6Pcs7mQHsb4oI1OVZpjj7x6iUeyiAFreL99nwcfwofXj9DbBS/OmpYyW04YA0hliaCK9NEe/GQgD7BVg1QLBASmZu9OHZpzN/cgj8VRpCY4+BMloa6Zyg6ZY4TAr1nJ+mYPYWDLyGZWwLyLnU3fZ/h4A32Yw8bSAjmO8fimNvpKZZSV8GgHySF/r3jqNYojLkjYJ6utzFen1o21Q4e3tDEwuC8pZxDL4DjpUWCdvlUgQ==;20:IAxkHjOUNvPCbPY/OJDkRyrx25d4PCbQTUfH0YTaN9DfzDy+XjuwbWp9WnBqyFw2C+iyQyoozQE9vhyaXNfeMN8F4FhZJYbm0R9r9eJea2SOmIEghGHHWj9RxUKqYej8JZ09CbaNMu/7SKVgwMMU3DmoTDCesTzCBFOAuKKQTiAh/pSRZ6FIyNN4aoOvMSx1N3Xr0JHYOMI3Hyw3DwNv6C5eFu+m7IGFm3dl9aXPmc4Ftbjaz+8Zzu+yxRETXzVd6ba9sx77421D7bUeoPMTniQ9LIbl7SUfIXmSRzzCdIuhsaW0+nLOOjnBjA0YjzSQaaKsdce7RuEGk9WfhDa8xl//qx6iul6Q4JV5svJffnv2mxf+DWPfkIi9HVjFhmX+C1eR70C/f/ApUpl4jnUJqugMlPTnvoYlKMUcV0iqh2PmPF+eW8oj+klz3A0erQ0HGOauWd5cW2ZBUpb/zwOgqywtSJuOpiTVKoAleTM9FenS/1ZUUZxFZgQoBrappXqQ 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)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6061324)(6041248);SRVR:BY2PR12MB0695;BCL:0;PCL:0;RULEID:;SRVR:BY2PR12MB0695; X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0695;4:86dnwLYvPJAIYVR2B2jN06p7uee4Gz/EGNmTYpDKL0zZtg5uM/0cTQL4AhqI4voWJ5cMvTQPRetlQ3C7meAAO2e/CT6QxDx42eaLxK/bES1OYojSI0nKozHClfIMt8OOjDLEd9cG9l/kq98lEIdvcVg9SAJIGTCCFkUqlGRYV/OgNCsKvHlUOnFPg3yxyo5MQZ05HrtUEWj03nlIvJrF2aTpSahx/ny0Kn3RBgquMpGVgr33W/vvLLkw4HoqUlHI0N4cVx2YHUBZrq9EWxiFXvvxOQTUHih4Smk/L5DM3fV/8QnnR85fxy+EmCKNpLvwvDsNsWeyaQvkW59X85EongqR4iyVpRir23FOGrITvu1X+HGq2+R3oUpjdH7Y39XyYgG+z/XQ+8GEpYIaG0Y86NMa2H0dlhvu/d68ZF9hmlCvfQQMQzuFrBmkRl/sEJyrDZCsqfNi/ErmLvDuc/JaskrErxnFEaMbYsllM7hOWQIju/ACTF1QZQYd8Nw3HpPf X-Forefront-PRVS: 013568035E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(377454003)(189002)(24454002)(377424004)(23746002)(65956001)(66066001)(77096005)(93886004)(92566002)(47776003)(38730400001)(7416002)(65806001)(81166006)(5660300001)(106356001)(101416001)(81156014)(105586002)(83506001)(229853002)(189998001)(1691005)(7846002)(31686004)(305945005)(7736002)(42186005)(86362001)(65826007)(8676002)(54356999)(76176999)(50986999)(64126003)(36756003)(4326007)(8666005)(551934003)(5001770100001)(2906002)(6666003)(2950100002)(97736004)(6636002)(230700001)(33646002)(6116002)(50466002)(4001350100001)(3846002)(31696002)(4001150100001)(68736007)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR12MB0695;H:[172.27.224.67];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BY2PR12MB0695;23:CZBxluK5NEt87PXAQycEZ9+uEttH4rha0kRcX?= =?Windows-1252?Q?oysn5hXFoBxZ7G8THKTHMda2rYTSCkanhFfVArIlTnUqFSz586LJZvtq?= =?Windows-1252?Q?a492XTgMyKFVjre/GxDsG3dw+ZQ5aqh1nPieNIUUV8Tw5CKXNMfwjUFR?= =?Windows-1252?Q?IpSBRtomECBzhdcbEc6S3m2iFE5liyyU4FtjrfuCwcGFEuDWiLjix2AI?= =?Windows-1252?Q?hmkzpIW1Q0cxBEcn3bYM7z3Yz2Csv3jh71v13lMoKQeUA89e1vwq4gqw?= =?Windows-1252?Q?QC/HX2VXV35C5m6QbUMRvOJNghwFIgbUjtEEKItMTpf0PAvbSiGJfyw6?= =?Windows-1252?Q?oADd7CDxfyDzgFK/pS1OQWhXW8PaE978jAD5VUlTAHvKiYlUjkaR9f3f?= =?Windows-1252?Q?j+Gju6w+AIZAqozDUACQuLINlCrP9fF+4mQ8eoJwZX/nVqZlTrKKO0wA?= =?Windows-1252?Q?UI0+PlrjEqhxWbPL3EpzYqqIVbYWMmeYUZJHyBMk9ysmY5n2zB76I9kD?= =?Windows-1252?Q?KoBzK6mL1Zoi1PK8mQoisNEf0PKC+eGEvUP2KCZAgWSR94D2BEZbEByo?= =?Windows-1252?Q?j7X9qz3aq4qumDxcQeDODYMjef0hMY2ZuOv6+doJw4EiQUvgdSYtxl/f?= =?Windows-1252?Q?9vrLlFpL/a30vWwsZYDYHw/SbCdH90mHFPpWjiXgF6hlZolratkaeviM?= =?Windows-1252?Q?66vfCG+gHH1UvqMAQN7p0ntQkx9s+ySXdaIJwmNUE7fd1DUWF/MiRauc?= =?Windows-1252?Q?CzjhPfWsXg6ku/TlnQ92SuSIrIuDlAug8EElWGNTI1p4lM0kcpgEqFho?= =?Windows-1252?Q?p4/svVsqPDsLKIKNWFqaAJf6nPSG0DN0/TgVXCXrk3XWquA6ztYJxWy7?= =?Windows-1252?Q?rFhLK5Fbr4kJ3rXoK5QIfsQayUpWM1cpFf6VkUm5XSnWi83xwqpU7Qvp?= =?Windows-1252?Q?RV++CEFBNSfkTdleyinrFtZVKIcmvY4E4YLpvm66lguUM/7nURWH9TbF?= =?Windows-1252?Q?m6JACfb6YJuApoz5OLmm9CoiYjcNej7HxmeIOaDT9osM1r7oEMSlKvL9?= =?Windows-1252?Q?KadVWaGfsgBlRNAJO6i5f7IW1JwNyg2EDFyNCmIIZkvmtNeLnQGz8Jn9?= =?Windows-1252?Q?jZBFy2ZbTqKK7vkWbXkbVvCGA40DbVs9CsWyuPkOWh7L5WTiNQECAKR4?= =?Windows-1252?Q?7et2cZrcVyZQL7q5Pn1FnaTqMDFpgRc+5K1JxMa7UZ48zMEjKxvn2nJX?= =?Windows-1252?Q?uX/Omg2WnWo13olYNsokQDyzOo//7uxxOq3b+R90qIlzy0xNUg7VfJFX?= =?Windows-1252?Q?R2C4Wpq+3dhVzykXY13ph62Gf1tkuaTD9/norf8bRWiS+8e8o6jwGPUS?= =?Windows-1252?Q?o9INUwXLBU3vS0IDpdPR325RYPn/GvKsJKeizp3el07a8I0h/21ExX+M?= =?Windows-1252?Q?t7DGi6b+94nDK4LrGPo6WczgWoYGJDITIkoip3XFz3p2xC7JavSP/ez1?= =?Windows-1252?Q?OnW/r92QHkl7HTz2N6FVtHFgQSboMMmBZirjnppRWqFIgKiWMuU1aKyn?= =?Windows-1252?Q?Zzf7MQqvXcLpAGnbtYGC2yWBNMBRDZZi+uTL5RA9+IHXy30iSojHdgQJ?= =?Windows-1252?Q?gpIDbzymSigD9n6xvX/HWM=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0695;6:T+Wue9qFbKS0fgSwzGCVHlpdhl6aYPBic6fN/c+I8x7rdT/RrbQaWtQiNhOa60qXtzYLZXJHRHhOY5l9nG6d54eRHHlYqRSeOHy1cu+t2rfyJYnHaVdXj2E596enzJFFYrfbyuE+6se5Rg30SEo4ch9Z1ANEG8Sfrh+m7TBiAI6WeMTp5CMgFPp8Y56It3LIn+ELzEOQRP4hfKeXBeFYR8pjph0thLTOwHRs1ZxMK2k9i84DDs8XZgApQBohIuc6bnsGD41NnuWRVe+JdzVL51gqMFG2g1MAp8vKtfenrAJwD7vWCdD9h8/BEiXtiSuZ4LQJw/OSHkTGcna6m2Ygc3jxjqHPpRH09KgnwsLkNEWUitz78wBEis+awVaaIkHF;5:N2WStKK8hSGBghk3aknzvgeMwNCaeiyCVbnaGmdWX8vILlMBCfibkPviVOBVk8WmxtSHoN7yaCUKyLsf9gsHaXrkWGuaHUyjzcWKx6gZtBHnd4qGsJiI+QP92rvVKAfKrvKuR1pRpvnPtq+XUnle8f2Thn6y067iPmpSKrGV7c0=;24:wuf7aioosuU6pqEfrh0wkdEipgqaq81DNKSs7Xiy+a3imTyqzc/k3vnbQSM3JAaNcGocfX3FmC8yIhE5vjZO7QEMu8tDHN7yhh+4oRtYgRM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0695;7:ufs9A2PnIyNK+bJPKfUWUOIQopi5BXUsUJ98RYU9WDodP9REiW7eZfb7rJ/0NMEVM40gMjiN9YICSpSEZzajeZ/k1vwwysnKegUdtqBq4mqhHVmHfaw9l1vFqBuxyPc6w7iMfSkzRGaeLCICuBpWn+6v8DwcRe8S7POeqGAeuo2CGdd97McJnFQ0nibL4EOmKzcGvAMiWZxjorw6dxw0pQQO1Tfb7qCNVDJPCv1Q4etK+3Hkiee6j9xdMA4K/zQhMiXW9Km7W4XrP9QKzMFIb99JgS+tYpeNXT/MyiMaYMjovQ3yIu+Tlm1AEISkX6BbeJYPIcaxTAZfO4bYVExw51DcdOVZa2Z8uSTQAznRxZM=;20:UbR3MtzHhsbLQFV5FzWEAMrDhg4kjBrfx1mz+GPxhy7p+S69Zt/wtF7q+mrzNtIXBL8Ak9M+5wKGUnDn2KNn9h1vBcA6Ks/2DRn/h1TpwCAn/gaEPBTf26hhwiomLr2X8Kofs4kEfvpwn5atE0cz+XnbYTQtrWdlgaTNHce6iSwHSruaGR17yJ5pAxryvwhPdhsnMbyvAzs7kqQblKGbFUz5ocWAKVGdskldrMPEhybLODE+brW39XEUyYShNmcy X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2016 19:06:40.7556 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0695 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 996 Lines: 20 On 2016-11-23 12:27 PM, Bart Van Assche wrote: > 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. My understanding is that the main problems are (a) h/w support (b) compatibility with IB Verbs semantic.