qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Eric Blake <eblake@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
	Peter Krempa <pkrempa@redhat.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Markus Armbruster <armbru@redhat.com>,
	Max Reitz <mreitz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Neil Skrypuch <neil@tembosocial.com>
Subject: Re: [Qemu-devel] [PATCH] file-posix: add drop-cache=on|off option
Date: Wed, 27 Feb 2019 15:56:27 +0000	[thread overview]
Message-ID: <20190227155627.GN31688@redhat.com> (raw)
In-Reply-To: <20190227153311.GH22539@stefanha-x1.localdomain>

On Wed, Feb 27, 2019 at 03:33:11PM +0000, Stefan Hajnoczi wrote:
> On Tue, Feb 26, 2019 at 10:54:55AM -0600, Eric Blake wrote:
> > On 2/26/19 9:35 AM, Stefan Hajnoczi wrote:
> > > Commit dd577a26ff03b6829721b1ffbbf9e7c411b72378 ("block/file-posix:
> > > implement bdrv_co_invalidate_cache() on Linux") introduced page cache
> > > invalidation so that cache.direct=off live migration is safe on Linux.
> > > 
> > > The invalidation takes a significant amount of time when the file is
> > > large and present in the page cache.  Normally this is not the case for
> > > cross-host live migration but it can happen when migrating between QEMU
> > > processes on the same host.
> > > 
> > > On same-host migration we don't need to invalidate pages for correctness
> > > anyway, so an option to skip page cache invalidation is useful.  I
> > > investigated optimizing invalidation and detecting same-host migration,
> > > but both are hard to achieve so a user-visible option will suffice.
> > > 
> > > As a bonus this option means that the cache invalidation feature will
> > > now be detectable by libvirt via QMP schema introspection.
> > 
> > Do you still want to pursue the QMP query-qemu-features command, or does
> > this delay that for another day?
> 
> The presence of this new option doesn't guarantee that dropping caches
> works.  It is currently only implemented on Linux.
> 
> We still need query-qemu-features so that libvirt can detect whether
> this QEMU binary can drop caches (e.g. on Linux vs FreeBSD).

The commit message said that libvirt would use this new option to
detect availability of the cache drop feature. That should probably
be removed from the commit message, as this caveat about non-portable
impl means libvirt can't actually rely on it.

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 :|

  reply	other threads:[~2019-02-27 15:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 15:35 [Qemu-devel] [PATCH] file-posix: add drop-cache=on|off option Stefan Hajnoczi
2019-02-26 16:54 ` Eric Blake
2019-02-27 15:33   ` Stefan Hajnoczi
2019-02-27 15:56     ` Daniel P. Berrangé [this message]
2019-02-27 17:36       ` Stefan Hajnoczi
2019-02-26 20:02 ` Neil Skrypuch
2019-02-27  9:57 ` Stefano Garzarella

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=20190227155627.GN31688@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=neil@tembosocial.com \
    --cc=pkrempa@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.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).