WSL2-Linux-Kernel/arch/powerpc
Li Zhong bd8cb03dbe powerpc: implement vmemmap_list_free()
This patch implements vmemmap_list_free() for vmemmap_free().

The freed entries will be removed from vmemmap_list, and form a freed list,
with next as the header. The next position in the last allocated page is kept
at the list tail.

When allocation, if there are freed entries left, get it from the freed list;
if no freed entries left, get it like before from the last allocated pages.

With this change, realmode_pfn_to_page() also needs to be changed to walk
all the entries in the vmemmap_list, as the virt_addr of the entries might not
be stored in order anymore.

It helps to reuse the memory when continuous doing memory hot-plug/remove
operations, but didn't reclaim the pages already allocated, so the memory usage
will only increase, but won't exceed the value for the largest memory
configuration.

Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-08-05 16:34:10 +10:00
..
boot powerpc: Fix wrong defintion in boot/io.h 2014-08-05 15:41:03 +10:00
configs memory: Freescale CoreNet Coherency Fabric error reporting driver 2014-07-29 19:26:30 -05:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include powerpc: Fail remap_4k_pfn() if PFN doesn't fit inside PTE 2014-08-05 16:34:06 +10:00
kernel powerpc/book3s: Fix endianess issue for HMI handling on napping cpus. 2014-08-05 16:34:01 +10:00
kvm powerpc/book3s: Add basic infrastructure to handle HMI in Linux. 2014-08-05 16:33:48 +10:00
lib powerpc: Remove power3 from comments 2014-07-28 14:10:26 +10:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc: implement vmemmap_list_free() 2014-08-05 16:34:10 +10:00
net net: filter: get rid of BPF_S_* enum 2014-06-01 22:16:58 -07:00
oprofile powerpc: Remove oprofile RS64 support 2014-07-28 14:10:25 +10:00
perf powerpc/perf: Add per-event excludes on Power8 2014-07-28 14:30:58 +10:00
platforms powerpc/powernv: Invoke opal call to handle hmi. 2014-08-05 16:33:52 +10:00
sysdev Merge remote-tracking branch 'scott/next' into next 2014-08-05 14:13:41 +10:00
xmon powerpc: Remove MMU_FTR_SLB 2014-07-28 14:10:23 +10:00
Kconfig powerpc: Disable RELOCATABLE for COMPILE_TEST with PPC64 2014-07-11 12:55:09 +10:00
Kconfig.debug powerpc/powernv: Remove OPAL v1 takeover 2014-06-25 13:10:47 +10:00
Makefile Merge branch 'merge' into next 2014-05-28 13:30:12 +10:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00