zsmalloc: reorganize struct size_class to pack 4 bytes hole
authorWeijie Yang <weijie.yang@samsung.com>
Thu, 14 Jan 2016 23:22:40 +0000 (15:22 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Jan 2016 19:40:52 +0000 (11:40 -0800)
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>
mm/zsmalloc.c

index 9f15bdd9163c2360edf2e070023b6099b683a85c..e7414cec220b3bce6cd5abbdd6a769f1f2c334a5 100644 (file)
@@ -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;
 };