mm/memcg: fix last_dead_count memory wastage
authorHugh Dickins <[email protected]>
Thu, 23 Jan 2014 23:53:30 +0000 (15:53 -0800)
committerLinus Torvalds <[email protected]>
Fri, 24 Jan 2014 00:36:53 +0000 (16:36 -0800)
Shorten mem_cgroup_reclaim_iter.last_dead_count from unsigned long to
int: it's assigned from an int and compared with an int, and adjacent to
an unsigned int: so there's no point to it being unsigned long, which
wasted 104 bytes in every mem_cgroup_per_zone.

Signed-off-by: Hugh Dickins <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c

index c8715056e1efd3fdd39d047e4c44382f4ee4ed47..aa66cc4c9e79b1654db117f63256544bf9500683 100644 (file)
@@ -149,7 +149,7 @@ struct mem_cgroup_reclaim_iter {
         * matches memcg->dead_count of the hierarchy root group.
         */
        struct mem_cgroup *last_visited;
-       unsigned long last_dead_count;
+       int last_dead_count;
 
        /* scan generation, increased every round-trip */
        unsigned int generation;