]> git.proxmox.com Git - mirror_qemu.git/commit
migration/rdma: Use ram_block_discard_disable()
authorDavid Hildenbrand <david@redhat.com>
Fri, 26 Jun 2020 07:22:35 +0000 (09:22 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 2 Jul 2020 09:54:59 +0000 (05:54 -0400)
commit5f1f1902f8e4020f27b4e35631a38c4e68d9be54
treeba23f9fa54f4f49c0ac4629fdbadc1501279f9ef
parentfee3f3baff12e78f544db51cc16ef028b8fe03a9
migration/rdma: Use ram_block_discard_disable()

RDMA will pin all guest memory (as documented in docs/rdma.txt). We want
to disable RAM block discards - however, to keep it simple use
ram_block_discard_is_required() instead of inhibiting.

Note: It is not sufficient to limit disabling to pin_all. Even when only
conditionally pinning 1 MB chunks, as soon as one page within such a
chunk was discarded and one page not, the discarded pages will be pinned
as well.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200626072248.78761-9-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
migration/rdma.c