virtio-mem: Try to unplug the complete online memory block first
authorDavid Hildenbrand <david@redhat.com>
Thu, 7 May 2020 14:01:39 +0000 (16:01 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Jun 2020 19:36:52 +0000 (15:36 -0400)
commit72f9525ad76b1ddfe663285805982e9d57c7b2c2
tree365d59b16783fb13c8b39b757be364bb58cda5c1
parent8d4edcfe78c0008d95effc0c90455cee59e18d10
virtio-mem: Try to unplug the complete online memory block first

Right now, we always try to unplug single subblocks when processing an
online memory block. Let's try to unplug the complete online memory block
first, in case it is fully plugged and the unplug request is large
enough. Fallback to single subblocks in case the memory block cannot get
unplugged as a whole.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20200507140139.17083-16-david@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_mem.c