From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Williams Subject: Re: [Qemu-devel] [RFC 2/2] KVM: add virtio-pmem driver Date: Thu, 19 Oct 2017 11:21:26 -0700 Message-ID: References: <20171012155027.3277-1-pagupta@redhat.com> <20171012155027.3277-3-pagupta@redhat.com> <20171017071633.GA9207@infradead.org> <1441791227.21027037.1508226056893.JavaMail.zimbra@redhat.com> <20171017080236.GA27649@infradead.org> <670833322.21037148.1508229041158.JavaMail.zimbra@redhat.com> <20171018130339.GB29767@stefanha-x1.localdomain> <20171019080149.GB10089@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20171019080149.GB10089-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Christoph Hellwig Cc: Kevin Wolf , Jan Kara , xiaoguangrong eric , KVM list , Pankaj Gupta , Stefan Hajnoczi , David Hildenbrand , ross zwisler , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Qemu Developers , Linux MM , Stefan Hajnoczi , linux-nvdimm , Paolo Bonzini , Nitesh Narayan Lal List-Id: linux-nvdimm@lists.01.org On Thu, Oct 19, 2017 at 1:01 AM, Christoph Hellwig wrote: > On Wed, Oct 18, 2017 at 08:51:37AM -0700, Dan Williams wrote: >> This use case is not "Persistent Memory". Persistent Memory is >> something you can map and make persistent with CPU instructions. >> Anything that requires a driver call is device driver managed "Shared >> Memory". > > How is this any different than the existing nvdimm_flush()? If you > really care about the not driver thing it could easily be a write > to a doorbell page or a hypercall, but in the end that's just semantics. The difference is that nvdimm_flush() is not mandatory, and that the platform will automatically perform the same flush at power-fail. Applications should be able to assume that if they are using MAP_SYNC that no other coordination with the kernel or the hypervisor is necessary. Advertising this as a generic Persistent Memory range to the guest means that the guest could theoretically use it with device-dax where there is no driver or filesystem sync interface. The hypervisor will be waiting for flush notifications and the guest will just issue cache flushes and sfence instructions. So, as far as I can see we need to differentiate this virtio-model from standard "Persistent Memory" to the guest and remove the possibility of guests/applications making the wrong assumption. Non-ODP RDMA in a guest comes to mind...