Skip to content

Commit

Permalink
zsmalloc: reorganize struct size_class to pack 4 bytes hole
Browse files Browse the repository at this point in the history
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: Weijie Yang <weijie.yang@samsung.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Weijie Yang authored and Linus Torvalds committed Jan 15, 2016
1 parent f58fb5e commit 7dfa461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/zsmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ struct size_class {
int size;
unsigned int index;

/* Number of PAGE_SIZE sized pages to combine to form a 'zspage' */
int pages_per_zspage;
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 */
bool huge;
};
Expand Down

0 comments on commit 7dfa461

Please sign in to comment.