mm/balloon_compaction: keep ballooned pages away from normal migration path

Proper testing shows yet another problem in balloon migration: it works only
once for each page. balloon_page_movable() check page flags and page_count.
In __unmap_and_move page is locked, reference counter is elevated, so
balloon_page_movable() _always_ fails here. As result in __unmap_and_move()
migration goes to the normal migration path.

Balloon ->migratepage() is so special, it returns MIGRATEPAGE_BALLOON_SUCCESS
instead of MIGRATEPAGE_SUCCESS. After that in move_to_new_page() successfully
migrated page got NULL into its mapping pointer and loses connectivity with
balloon and ability for further migration.

It's safe to use __is_movable_balloon_page here: page is isolated and pinned.

Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Cc: stable <stable@vger.kernel.org> # v3.8
mm/balloon_compaction: isolate balloon pages without lru_lock

LRU-lock isn't required for balloon page isolation. This check makes migration
of some ballooned pages mostly impossible because isolate_migratepages_range()
drops LRU lock periodically.

Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Cc: stable <stable@vger.kernel.org> # v3.8
mm: introduce common page state for ballooned memory

This patch adds page state PageBallon() and functions __Set/ClearPageBalloon.
Like PageBuddy() PageBalloon() looks like page-flag but actually this is special
state of page->_mapcount counter. There is no conflict because ballooned pages
cannot be mapped and cannot be in buddy allocator.

Ballooned pages are counted in vmstat counter NR_BALLOON_PAGES, it's shown them
in /proc/meminfo and /proc/meminfo. Also this patch it exports PageBallon into
userspace via /proc/kpageflags as KPF_BALLOON.

All this code including mm/balloon_compaction.o is under CONFIG_MEMORY_BALLOON,
it should be selected by ballooning driver which want use this feature.

v2: move __Set/ClearPageBalloon into linux/mm.h

Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
mm/balloon_compaction: use common page ballooning

This patch replaces checking AS_BALLOON_MAP in page->mapping->flags
with PageBalloon which is stored directly in the struct page.

Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
mm/balloon_compaction: general cleanup

* move special branch for balloon migraion into migrate_pages
* remove special mapping for balloon and its flag AS_BALLOON_MAP
* embed struct balloon_dev_info into struct virtio_balloon
* cleanup balloon_page_dequeue, kill balloon_page_free

Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
selftests/vm/transhuge-stress: stress test for memory compaction

This tool induces memory fragmentation via sequential allocation of transparent
huge pages and splitting off everything except their last sub-pages.

Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>