Commit 7dfa4612 authored by Weijie Yang's avatar Weijie Yang Committed by Linus Torvalds

zsmalloc: reorganize struct size_class to pack 4 bytes hole

Reoder the pages_per_zspage field in struct size_class which can
eliminate the 4 bytes hole between it and stats field.
Signed-off-by: default avatarWeijie Yang <weijie.yang@samsung.com>
Reviewed-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f58fb5e7
...@@ -213,10 +213,10 @@ struct size_class { ...@@ -213,10 +213,10 @@ struct size_class {
int size; int size;
unsigned int index; unsigned int index;
/* Number of PAGE_SIZE sized pages to combine to form a 'zspage' */
int pages_per_zspage;
struct zs_size_stat stats; struct zs_size_stat stats;
/* Number of PAGE_SIZE sized pages to combine to form a 'zspage' */
int pages_per_zspage;
/* huge object: pages_per_zspage == 1 && maxobj_per_zspage == 1 */ /* huge object: pages_per_zspage == 1 && maxobj_per_zspage == 1 */
bool huge; bool huge;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment