From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Moyer Subject: Re: [RFC v2 1/2] virtio: add pmem driver Date: Thu, 26 Apr 2018 08:27:41 -0400 Message-ID: References: <20180425112415.12327-1-pagupta@redhat.com> <20180425112415.12327-2-pagupta@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: (Dan Williams's message of "Wed, 25 Apr 2018 07:43:52 -0700") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Dan Williams Cc: Jan Kara , KVM list , David Hildenbrand , linux-nvdimm , "Zwisler, Ross" , Qemu Developers , lcapitulino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Linux MM , niteshnarayanlal-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org, "Michael S. Tsirkin" , Christoph Hellwig , Marcel Apfelbaum , Nitesh Narayan Lal , Rik van Riel , Stefan Hajnoczi , Paolo Bonzini , Kevin Wolf , Xiao Guangrong , Linux Kernel Mailing List , Igor Mammedov List-Id: linux-nvdimm@lists.01.org Dan Williams writes: > [ adding Jeff directly since he has also been looking at > infrastructure to track when MAP_SYNC should be disabled ] > > On Wed, Apr 25, 2018 at 7:21 AM, Dan Williams wrote: >> On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta wrote: >>> This patch adds virtio-pmem driver for KVM >>> guest. >> >> Minor nit, please expand your changelog line wrapping to 72 columns. >> >>> >>> Guest reads the persistent memory range >>> information from Qemu over VIRTIO and registers >>> it on nvdimm_bus. It also creates a nd_region >>> object with the persistent memory range >>> information so that existing 'nvdimm/pmem' >>> driver can reserve this into system memory map. >>> This way 'virtio-pmem' driver uses existing >>> functionality of pmem driver to register persistent >>> memory compatible for DAX capable filesystems. >> >> We need some additional enabling to disable MAP_SYNC for this enable to disable... I like it! ;-) >> configuration. In other words, if fsync() is required then we must >> disable the MAP_SYNC optimization. I think this should be a struct >> dax_device property looked up at mmap time in each MAP_SYNC capable >> ->mmap() file operation implementation. Ideally, qemu (seabios?) would advertise a platform capabilities sub-table that doesn't fill in the flush bits. -Jeff