Drivers: hv: hv_balloon: report offline pages as being used
authorVitaly Kuznetsov <vkuznets@redhat.com>
Sat, 28 Feb 2015 19:38:59 +0000 (11:38 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 03:31:47 +0000 (19:31 -0800)
commit549fd280b145e2154db5a7d06981d041f8bbf597
tree1330694a9d1dd509e7ded7e94bcaa848388f8d39
parentb05d8d9ef5ef21d1b18440430f950304836e1aaa
Drivers: hv: hv_balloon: report offline pages as being used

When hot-added memory pages are not brought online or when some memory blocks
are sent offline the subsequent ballooning process kills the guest with OOM
killer. This happens as we don't report these pages as neither used nor free
and apparently host algorithm considers them as being unused. Keep track of
all online/offline operations and report all currently offline pages as being
used so host won't try to balloon them out.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv_balloon.c