From: "Daniel P. Berrange" <berrange@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Haozhong Zhang <haozhong.zhang@intel.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Igor Mammedov <imammedo@redhat.com>,
Xiao Guangrong <guangrong.xiao@gmail.com>,
qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device
Date: Tue, 30 May 2017 10:20:15 +0100 [thread overview]
Message-ID: <20170530092015.GD21566@redhat.com> (raw)
In-Reply-To: <CAPcyv4g-=VytzHCw8QzSq5yNW-PLPz0MNzT=vDqxTmEuF_DWHQ@mail.gmail.com>
On Fri, May 26, 2017 at 08:25:20AM -0700, Dan Williams wrote:
> On Fri, May 26, 2017 at 7:38 AM, Daniel P. Berrange <berrange@redhat.com> wrote:
> > On Thu, May 25, 2017 at 08:34:23PM -0700, Dan Williams wrote:
> >> On Thu, May 25, 2017 at 7:32 PM, Haozhong Zhang
> >> <haozhong.zhang@intel.com> wrote:
> >> > Applications in Linux guest that use device-dax never trigger flush
> >> > that can be trapped by KVM/QEMU. Meanwhile, if the host backend is not
> >> > device-dax, QEMU cannot guarantee the persistence of guest writes.
> >> > Before solving this flushing problem, QEMU should warn users if the
> >> > host backend is not device-dax.
> >>
> >> I think this needs to be stronger than a "warn" it needs to be
> >> explicitly forbidden when it is known to be unsafe.
> >
> > I think users should have the choice in what they want to do -
> > QEMU should not artifically block it. There are plenty of things
> > in QEMU that are potentially unsafe in some usage scenarios, but
> > we just document how to use them in a safe manner & any caveats
> > that apply. Higher level applications above QEMU can then consider
> > how they want to apply a usage policy to meet the needs of their
> > usage scenario.
> >
> > Having an emulated DAX device that doesn't guarantee persistence
> > is no different to having an emulated disk device that never flushes
> > to underlying host storage.
> >
>
> It is different in the sense that the contract of when the guest
> should assume persistence is specified by when the write completes to
> the virtual disk. In the case of the virtual NFIT we are currently
> lying to the guest about that platform persistence guarantee even if
> the hypervisor is emulating pmem with volatile memory.
We equally lie to the guest about persistence of disks, when the
disk is run with certain cache= settings, or when the disk backing file
is on tmpfs. It is simply a choice the mgmt application makes about
whether to provide backing storage that is capable of satsifying the
guarantees implied by the guest device model. So I'm still not seeing
a compelling reason to artifically block this with DAX.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2017-05-30 9:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 2:32 [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device Haozhong Zhang
2017-05-26 2:32 ` [Qemu-devel] [RESEND PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment Haozhong Zhang
2017-05-26 6:39 ` Marc-André Lureau
[not found] ` <20170526065132.ayapfebbft5lyigd@hz-desktop>
2017-05-26 7:05 ` Marc-André Lureau
[not found] ` <20170526071654.kxcqflvpo2tvcrvu@hz-desktop>
2017-05-26 14:24 ` Dan Williams
2017-05-26 18:55 ` Eduardo Habkost
2017-05-26 20:50 ` Dan Williams
2017-05-27 1:04 ` Haozhong Zhang
2017-05-30 12:17 ` Paolo Bonzini
2017-05-30 19:16 ` Dan Williams
2017-05-26 3:34 ` [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device Dan Williams
2017-05-26 4:30 ` Haozhong Zhang
2017-05-26 14:28 ` Dan Williams
2017-05-26 14:38 ` Daniel P. Berrange
2017-05-26 15:25 ` Dan Williams
2017-05-27 1:13 ` Haozhong Zhang
2017-05-30 9:20 ` Daniel P. Berrange [this message]
2017-05-30 11:41 ` Dan Williams
2017-06-01 12:00 ` Xiao Guangrong
2017-06-01 13:53 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170530092015.GD21566@redhat.com \
--to=berrange@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=guangrong.xiao@gmail.com \
--cc=haozhong.zhang@intel.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).