Skip to content

RFC remove vm_struct list management

Joonsoo Kim kexec linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8mm, vmalloc: change iterating a vmlist to find_vm_area()arch/tile/mm/pgtable.c arch/unicore32/mm/ioremap.c arch/x86/mm/ioremap.c+7 -246 replies
2/8mm, vmalloc: move get_vmalloc_info() to vmalloc.cfs/proc/Makefile fs/proc/internal.h fs/proc/meminfo.c +3 more+64 -790 replies
3/8mm, vmalloc: protect va->vm by vmap_area_lockmm/vmalloc.c+7 -00 replies
4/8mm, vmalloc: iterate vmap_area_list, instead of vmlist in vread/vwrite()mm/vmalloc.c+32 -160 replies
5/8mm, vmalloc: iterate vmap_area_list in get_vmalloc_info()mm/vmalloc.c+27 -260 replies
6/8mm, vmalloc: iterate vmap_area_list, instead of vmlist, in vmallocinfo()mm/vmalloc.c+56 -260 replies
7/8mm, vmalloc: makes vmlist only for kexecmm/vmalloc.c+37 -130 replies
8/8mm, vmalloc: remove list management operation after initializing vmallocinclude/linux/vmalloc.h mm/vmalloc.c+11 -380 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchGuan XuetaoIngo Molnar
1/8A-b A-b
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/8] remove vm_struct list management

This patchset remove 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.

I'm not sure that "7/8: makes vmlist only for kexec" is fine. Because it is related to userspace program.
As far as I know, makedumpfile use kexec's output information and it only need first address of vmalloc layer. So my implementation reflect this fact, but I'm not sure. And now, I don't fully test this patchset. Basic operation work well, but I don't test kexec. So I send this patchset with 'RFC'.

Please let me know what I am missing.

This series based on v3.7-rc7 and on top of submitted patchset for ARM. 'introduce static_vm for ARM-specific static mapped area'
https://lkml.org/lkml/2012/11/27/356
But, running properly on x86 without ARM patchset.

Joonsoo Kim (8):
mm, vmalloc: change iterating a vmlist to find_vm_area() mm, vmalloc: move get_vmalloc_info() to vmalloc.c
mm, vmalloc: protect va->vm by vmap_area_lock
mm, vmalloc: iterate vmap_area_list, instead of vmlist in
vread/vwrite()
mm, vmalloc: iterate vmap_area_list in get_vmalloc_info() mm, vmalloc: iterate vmap_area_list, instead of vmlist, in
vmallocinfo()
mm, vmalloc: makes vmlist only for kexec
mm, vmalloc: remove list management operation after initializing
vmalloc

 arch/tile/mm/pgtable.c      |    7 +-
 arch/unicore32/mm/ioremap.c |   17 +--
 arch/x86/mm/ioremap.c       |    7 +-
 fs/proc/Makefile            |    2 +-
 fs/proc/internal.h          |   18 ---
 fs/proc/meminfo.c           |    1 +
 fs/proc/mmu.c               |   60 ----------
 include/linux/vmalloc.h     |   19 +++-
 mm/vmalloc.c                |  258 +++++++++++++++++++++++++++++--------------
 9 files changed, 204 insertions(+), 185 deletions(-)
 delete mode 100644 fs/proc/mmu.c
Signature · 7 lines
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>