diff options
author | Pengfei Li <[email protected]> | 2019-09-23 15:36:39 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-09-24 15:54:10 -0700 |
commit | 688fcbfc06e4fdfbb7e1d5a942a1460fe6379d2d (patch) | |
tree | 59aed6b336daeb448f621b901a180f80841b58a7 /lib/mpi/mpi-cmp.c | |
parent | dd3b8353bae79395b12a178de057b183ff0122eb (diff) |
mm/vmalloc: modify struct vmap_area to reduce its size
Objective
---------
The current implementation of struct vmap_area wasted space.
After applying this commit, sizeof(struct vmap_area) has been
reduced from 11 words to 8 words.
Description
-----------
1) Pack "subtree_max_size", "vm" and "purge_list". This is no problem
because
A) "subtree_max_size" is only used when vmap_area is in "free" tree
B) "vm" is only used when vmap_area is in "busy" tree
C) "purge_list" is only used when vmap_area is in vmap_purge_list
2) Eliminate "flags".
;Since only one flag VM_VM_AREA is being used, and the same thing can be
done by judging whether "vm" is NULL, then the "flags" can be eliminated.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Pengfei Li <[email protected]>
Suggested-by: Uladzislau Rezki (Sony) <[email protected]>
Reviewed-by: Uladzislau Rezki (Sony) <[email protected]>
Cc: Hillf Danton <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Oleksiy Avramchenko <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions