OSDN Git Service

virtio-mem: prepare page onlining code for granularity smaller than MAX_ORDER - 1
authorDavid Hildenbrand <david@redhat.com>
Fri, 26 Nov 2021 13:42:08 +0000 (14:42 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 14 Jan 2022 23:50:52 +0000 (18:50 -0500)
commit6639032acc085775452a2c92fdb8a6f601c9c075
treebc14b4e08baa0c4e7480beebf1c94b3c516c923e
parent539fec78edb4e084e7c532affc56cc42d4ceea4b
virtio-mem: prepare page onlining code for granularity smaller than MAX_ORDER - 1

Let's prepare our page onlining code for subblock size smaller than
MAX_ORDER - 1: we'll get called for a MAX_ORDER - 1 page but might have
some subblocks in the range plugged and some unplugged. In that case,
fallback to subblock granularity to properly only expose the plugged
parts to the buddy.

Signed-off-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20211126134209.17332-2-david@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Eric Ren <renzhengeek@gmail.com>
drivers/virtio/virtio_mem.c