On Thu, Mar 07, 2019 at 04:49:41PM +0000, 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.
> 
> Suggested-by: Neil Skrypuch <n...@tembosocial.com>
> Tested-by: Neil Skrypuch <n...@tembosocial.com>
> Reviewed-by: Stefano Garzarella <sgarz...@redhat.com>
> Reviewed-by: Eric Blake <ebl...@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
> ---
> v3:
>  * This option is now conditional on CONFIG_LINUX and *can* be used for
>    libvirt feature detection after all [eblake/armbru]
> v2:
>  * Remove outdated comment about libvirt feature detection [danpb]
> ---
>  qapi/block-core.json |  6 ++++++
>  block/file-posix.c   | 16 ++++++++++++++++
>  2 files changed, 22 insertions(+)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to