linux-stable/include
Naoya Horiguchi c8721bbbdd mm: memory-hotplug: enable memory hotplug to handle hugepage
Until now we can't offline memory blocks which contain hugepages because a
hugepage is considered as an unmovable page.  But now with this patch
series, a hugepage has become movable, so by using hugepage migration we
can offline such memory blocks.

What's different from other users of hugepage migration is that we need to
decompose all the hugepages inside the target memory block into free buddy
pages after hugepage migration, because otherwise free hugepages remaining
in the memory block intervene the memory offlining.  For this reason we
introduce new functions dissolve_free_huge_page() and
dissolve_free_huge_pages().

Other than that, what this patch does is straightforwardly to add hugepage
migration code, that is, adding hugepage code to the functions which scan
over pfn and collect hugepages to be migrated, and adding a hugepage
allocation function to alloc_migrate_target().

As for larger hugepages (1GB for x86_64), it's not easy to do hotremove
over them because it's larger than memory block.  So we now simply leave
it to fail as it is.

[yongjun_wei@trendmicro.com.cn: remove duplicated include]
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Rik van Riel <riel@redhat.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-09-11 15:57:48 -07:00
..
acpi Merge branch 'acpi-hotplug' 2013-08-30 14:14:25 +02:00
asm-generic Merge branch 'for-v3.12' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2013-09-09 10:26:33 -07:00
clocksource ARM: SoC cleanups for 3.12 2013-09-06 13:21:16 -07:00
crypto
drm Merge tag 'drm-intel-fixes-2013-09-06' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes 2013-09-10 12:36:55 +10:00
dt-bindings Device tree core updates for v3.12 2013-09-10 13:53:52 -07:00
keys
kvm ARM: KVM: vgic: Bump VGIC_NR_IRQS to 256 2013-08-30 16:12:39 +03:00
linux mm: memory-hotplug: enable memory hotplug to handle hugepage 2013-09-11 15:57:48 -07:00
math-emu
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-09-05 14:54:29 -07:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-09-05 14:54:29 -07:00
pcmcia
ras
rdma Merge branches 'cxgb4', 'flowsteer', 'ipoib', 'iser', 'mlx4', 'ocrdma' and 'qib' into for-next 2013-09-03 09:01:08 -07:00
rxrpc
scsi [SCSI] Generate uevents on certain unit attention codes 2013-08-26 18:52:27 +04:00
sound Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2013-09-05 11:55:59 -07:00
target
trace mm/page_alloc.c: fix the value of fallback_migratetype in alloc_extfrag tracepoint() 2013-09-11 15:57:19 -07:00
uapi Add the ability to collect I/O statistics on user-defined regions of a 2013-09-10 13:06:15 -07:00
video fbdev changes for 3.12: 2013-09-05 09:49:32 -07:00
xen Features: 2013-09-04 17:45:39 -07:00
Kbuild