vmw_balloon: Compaction support
authorNadav Amit <namit@vmware.com>
Thu, 25 Apr 2019 11:54:43 +0000 (04:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2019 18:19:17 +0000 (20:19 +0200)
commit83a8afa72e9c0a200d9d400ce83a0cb5193b0e3d
tree0964cd0514e8624a48eb0622e140d08ece28bd76
parent418a3ab1e7785799193c0f8628cd0f01c00a03ae
vmw_balloon: Compaction support

Add support for compaction for VMware balloon. Since unlike the virtio
balloon, we also support huge-pages, which are not going through
compaction, we keep these pages in vmballoon and handle this list
separately. We use the same lock to protect both lists, as this lock is
not supposed to be contended.

Doing so also eliminates the need for the page_size lists. We update the
accounting as needed to reflect inflation, deflation and migration to be
reflected in vmstat.

Since VMware balloon now provides statistics for inflation, deflation
and migration in vmstat, select MEMORY_BALLOON in Kconfig.

Reviewed-by: Xavier Deguillard <xdeguillard@vmware.com>
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/Kconfig
drivers/misc/vmw_balloon.c