Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756613AbcKVUBW (ORCPT ); Tue, 22 Nov 2016 15:01:22 -0500 Received: from mail-oi0-f46.google.com ([209.85.218.46]:36432 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756371AbcKVUBU (ORCPT ); Tue, 22 Nov 2016 15:01:20 -0500 MIME-Version: 1.0 In-Reply-To: <75a1f44f-c495-7d1e-7e1c-17e89555edba@amd.com> References: <75a1f44f-c495-7d1e-7e1c-17e89555edba@amd.com> From: Dan Williams Date: Tue, 22 Nov 2016 12:01:17 -0800 Message-ID: Subject: Re: Enabling peer to peer device transactions for PCIe devices To: Serguei Sagalovitch Cc: "Deucher, Alexander" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "Linux-media@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-pci@vger.kernel.org" , "Bridgman, John" , "Kuehling, Felix" , "Blinzer, Paul" , "Koenig, Christian" , "Suthikulpanit, Suravee" , "Sander, Ben" , Dave Hansen Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1072 Lines: 24 On Tue, Nov 22, 2016 at 10:59 AM, Serguei Sagalovitch wrote: > Dan, > > I personally like "device-DAX" idea but my concerns are: > > - How well it will co-exists with the DRM infrastructure / implementations > in part dealing with CPU pointers? Inside the kernel a device-DAX range is "just memory" in the sense that you can perform pfn_to_page() on it and issue I/O, but the vma is not migratable. To be honest I do not know how well that co-exists with drm infrastructure. > - How well we will be able to handle case when we need to "move"/"evict" > memory/data to the new location so CPU pointer should point to the new > physical location/address > (and may be not in PCI device memory at all)? So, device-DAX deliberately avoids support for in-kernel migration or overcommit. Those cases are left to the core mm or drm. The device-dax interface is for cases where all that is needed is a direct-mapping to a statically-allocated physical-address range be it persistent memory or some other special reserved memory range.