WSL2-Linux-Kernel/arch
Joonsoo Kim ef93247325 mm, vmalloc: change iterating a vmlist to find_vm_area()
This patchset removes vm_struct list management after initializing
vmalloc.  Adding and removing an entry to vmlist is linear time
complexity, so it is inefficient.  If we maintain this list, overall
time complexity of adding and removing area to vmalloc space is O(N),
although we use rbtree for finding vacant place and it's time complexity
is just O(logN).

And vmlist and vmlist_lock is used many places of outside of vmalloc.c.
It is preferable that we hide this raw data structure and provide
well-defined function for supporting them, because it makes that they
cannot mistake when manipulating theses structure and it makes us easily
maintain vmalloc layer.

For kexec and makedumpfile, I export vmap_area_list, instead of vmlist.
This comes from Atsushi's recommendation.  For more information, please
refer below link.  https://lkml.org/lkml/2012/12/6/184

This patch:

The purpose of iterating a vmlist is finding vm area with specific virtual
address.  find_vm_area() is provided for this purpose and more efficient,
because it uses a rbtree.  So change it.

Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Cc: Dave Anderson <anderson@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29 15:54:33 -07:00
..
alpha mm/alpha: use common help functions to free reserved pages 2013-04-29 15:54:29 -07:00
arc mm/arc: use common help functions to free reserved pages 2013-04-29 15:54:31 -07:00
arm mm/ARM: use free_highmem_page() to free highmem pages into buddy system 2013-04-29 15:54:31 -07:00
arm64 mm/ARM: use common help functions to free reserved pages 2013-04-29 15:54:29 -07:00
avr32 mm/avr32: use common help functions to free reserved pages 2013-04-29 15:54:29 -07:00
blackfin mm/blackfin: use common help functions to free reserved pages 2013-04-29 15:54:29 -07:00
c6x mm/c6x: use common help functions to free reserved pages 2013-04-29 15:54:29 -07:00
cris mm/cris: use common help functions to free reserved pages 2013-04-29 15:54:29 -07:00
frv mm/FRV: use free_highmem_page() to free highmem pages into buddy system 2013-04-29 15:54:32 -07:00
h8300 mm/h8300: use common help functions to free reserved pages 2013-04-29 15:54:29 -07:00
hexagon
ia64 mm/hugetlb: add more arch-defined huge_pte functions 2013-04-29 15:54:33 -07:00
m32r mm/m32r: use common help functions to free reserved pages 2013-04-29 15:54:30 -07:00
m68k mm/m68k: use common help functions to free reserved pages 2013-04-29 15:54:30 -07:00
metag mm/metag: use free_highmem_page() to free highmem pages into buddy system 2013-04-29 15:54:32 -07:00
microblaze mm/microblaze: use free_highmem_page() to free highmem pages into buddy system 2013-04-29 15:54:32 -07:00
mips mm/hugetlb: add more arch-defined huge_pte functions 2013-04-29 15:54:33 -07:00
mn10300 mm/mn10300: use common help functions to free reserved pages 2013-04-29 15:54:30 -07:00
openrisc mm/openrisc: use common help functions to free reserved pages 2013-04-29 15:54:30 -07:00
parisc mm/parisc: use common help functions to free reserved pages 2013-04-29 15:54:30 -07:00
powerpc mm/hugetlb: add more arch-defined huge_pte functions 2013-04-29 15:54:33 -07:00
s390 mm/hugetlb: add more arch-defined huge_pte functions 2013-04-29 15:54:33 -07:00
score mm/score: use common help functions to free reserved pages 2013-04-29 15:54:31 -07:00
sh mm/hugetlb: add more arch-defined huge_pte functions 2013-04-29 15:54:33 -07:00
sparc mm/hugetlb: add more arch-defined huge_pte functions 2013-04-29 15:54:33 -07:00
tile mm, vmalloc: change iterating a vmlist to find_vm_area() 2013-04-29 15:54:33 -07:00
um mm/um: use free_highmem_page() to free highmem pages into buddy system 2013-04-29 15:54:32 -07:00
unicore32 mm, vmalloc: change iterating a vmlist to find_vm_area() 2013-04-29 15:54:33 -07:00
x86 mm, vmalloc: change iterating a vmlist to find_vm_area() 2013-04-29 15:54:33 -07:00
xtensa mm/xtensa: use common help functions to free reserved pages 2013-04-29 15:54:31 -07:00
.gitignore
Kconfig