linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] mm/vmalloc.c: improve readability and rewrite vmap_area
@ 2019-07-02 14:15 Pengfei Li
  2019-07-02 14:15 ` [PATCH v2 1/5] mm/vmalloc.c: Introduce a wrapper function of insert_vmap_area() Pengfei Li
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Pengfei Li @ 2019-07-02 14:15 UTC (permalink / raw)
  To: akpm, peterz, urezki
  Cc: rpenyaev, mhocko, guro, aryabinin, rppt, mingo, rick.p.edgecombe,
	linux-mm, linux-kernel, Pengfei Li


v1 -> v2:
* patch 3: Rename __find_vmap_area to __search_va_in_busy_tree
           instead of __search_va_from_busy_tree.
* patch 5: Add motivation and necessary test data to the commit
           message.
* patch 5: Let va->flags use only some low bits of va_start
           instead of completely overwriting va_start.


The current implementation of struct vmap_area wasted space. At the
determined stage, not all members of the structure will be used.

For this problem, this commit places multiple structural members that
are not being used at the same time into a union to reduce the size
of the structure.

And local test results show that this commit will not hurt performance.

After applying this commit, sizeof(struct vmap_area) has been reduced
from 11 words to 8 words.

Pengfei Li (5):
  mm/vmalloc.c: Introduce a wrapper function of insert_vmap_area()
  mm/vmalloc.c: Introduce a wrapper function of
    insert_vmap_area_augment()
  mm/vmalloc.c: Rename function __find_vmap_area() for readability
  mm/vmalloc.c: Modify function merge_or_add_vmap_area() for readability
  mm/vmalloc.c: Rewrite struct vmap_area to reduce its size

 include/linux/vmalloc.h |  28 +++++---
 mm/vmalloc.c            | 139 ++++++++++++++++++++++++++++------------
 2 files changed, 118 insertions(+), 49 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-04  9:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 14:15 [PATCH v2 0/5] mm/vmalloc.c: improve readability and rewrite vmap_area Pengfei Li
2019-07-02 14:15 ` [PATCH v2 1/5] mm/vmalloc.c: Introduce a wrapper function of insert_vmap_area() Pengfei Li
2019-07-02 14:15 ` [PATCH v2 2/5] mm/vmalloc.c: Introduce a wrapper function of insert_vmap_area_augment() Pengfei Li
2019-07-02 14:15 ` [PATCH v2 3/5] mm/vmalloc.c: Rename function __find_vmap_area() for readability Pengfei Li
2019-07-02 14:15 ` [PATCH v2 4/5] mm/vmalloc.c: Modify function merge_or_add_vmap_area() " Pengfei Li
2019-07-02 14:15 ` [PATCH v2 5/5] mm/vmalloc.c: Rewrite struct vmap_area to reduce its size Pengfei Li
2019-07-03 19:30 ` [PATCH v2 0/5] mm/vmalloc.c: improve readability and rewrite vmap_area Uladzislau Rezki
2019-07-04  9:31   ` Pengfei Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox