virtio-mem: retry fake-offlining via alloc_contig_range() on ZONE_MOVABLE
authorDavid Hildenbrand <david@redhat.com>
Thu, 12 Nov 2020 13:37:56 +0000 (14:37 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 18 Dec 2020 21:14:26 +0000 (16:14 -0500)
commitf2d799d591359685a3a74d28c2989c56f4bb9898
treec3612f771eb0ac45066ccf684544796eb5074cf6
parent7a34c77dab7e0c7ecb58da8bf600b7aadb4d878c
virtio-mem: retry fake-offlining via alloc_contig_range() on ZONE_MOVABLE

ZONE_MOVABLE is supposed to give some guarantees, yet,
alloc_contig_range() isn't prepared to properly deal with some racy
cases properly (e.g., temporary page pinning when exiting processed, PCP).

Retry 5 times for now. There is certainly room for improvement in the
future.

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