From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 7 Nov 2017 06:21:36 -0500 (EST) From: Pankaj Gupta Message-ID: <1412426579.28360924.1510053696238.JavaMail.zimbra@redhat.com> In-Reply-To: References: <1455443283.33337333.1500618150787.JavaMail.zimbra@redhat.com> <86754966-281f-c3ed-938c-f009440de563@gmail.com> <1228466331.27752565.1509955040884.JavaMail.zimbra@redhat.com> Subject: Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion MIME-Version: 1.0 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Dan Williams Cc: Kevin Wolf , Jan Kara , Xiao Guangrong , kvm-devel , Amit Shah , Stefan Hajnoczi , Ross Zwisler , Qemu Developers , Christoph Hellwig , Stefan Hajnoczi , "linux-nvdimm@lists.01.org" , Paolo Bonzini , Nitesh Narayan Lal , Aams@amazon.com List-ID: > > > > > >> [..] > >> >> Yes, the GUID will specifically identify this range as "Virtio Shared > >> >> Memory" (or whatever name survives after a bikeshed debate). The > >> >> libnvdimm core then needs to grow a new region type that mostly > >> >> behaves the same as a "pmem" region, but drivers/nvdimm/pmem.c grows a > >> >> new flush interface to perform the host communication. Device-dax > >> >> would be disallowed from attaching to this region type, or we could > >> >> grow a new device-dax type that does not allow the raw device to be > >> >> mapped, but allows a filesystem mounted on top to manage the flush > >> >> interface. > >> > > >> > > >> > I am afraid it is not a good idea that a single SPA is used for multiple > >> > purposes. For the region used as "pmem" is directly mapped to the VM so > >> > that guest can freely access it without host's assistance, however, for > >> > the region used as "host communication" is not mapped to VM, so that > >> > it causes VM-exit and host gets the chance to do specific operations, > >> > e.g, flush cache. So we'd better distinctly define these two regions to > >> > avoid the unnecessary complexity in hypervisor. > >> > >> Good point, I was assuming that the mmio flush interface would be > >> discovered separately from the NFIT-defined memory range. Perhaps via > >> PCI in the guest? This piece of the proposal needs a bit more > >> thought... > > > > Also, in earlier discussions we agreed for entire device flush whenever > > guest > > performs a fsync on DAX file. If we do a MMIO call for this, guest CPU > > would be > > trapped for the duration device flush is completed. > > > > Instead, if we do perform an asynchronous flush guest CPU's can be utilized > > by > > some other tasks till flush completes? > > Yes, the interface for the guest to trigger and wait for flush > requests should be asynchronous, just like a storage "flush-cache" > command. One idea got while discussing this with Rik & Amit during KVM forum is to use something similar to Hyperv Key-value pair for sharing command between guest <=> host. Don't think such thing exists yet for KVM? Or how we can utilize existing features in KVM to achieve this? _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm