The mem_cgroup_reclaim_cookie is only used in memcg softlimit reclaim now, and the priority of the reclaim is always 0. We don't need to define the iter in struct mem_cgroup_per_node as an array any more. That could make the code more clear and save some space.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -58,7 +58,6 @@ enum mem_cgroup_protection { · 57 unmodified lines | |||
| 58 | 58 | ||
| 59 | struct mem_cgroup_reclaim_cookie { | 59 | struct mem_cgroup_reclaim_cookie { |
| 60 | pg_data_t *pgdat; | 60 | pg_data_t *pgdat; |
| 61 | int priority; | ||
| 62 | unsigned int generation; | 61 | unsigned int generation; |
| 63 | }; | 62 | }; |
| 64 | 63 | ||
| @@ -126,7 +125,7 @@ struct mem_cgroup_per_node { · 61 unmodified lines | |||
| 126 | 125 | ||
| 127 | unsigned long lru_zone_size[MAX_NR_ZONES][NR_LRU_LISTS]; | 126 | unsigned long lru_zone_size[MAX_NR_ZONES][NR_LRU_LISTS]; |
| 128 | 127 | ||
| 129 | struct mem_cgroup_reclaim_iter iter[DEF_PRIORITY + 1]; | 128 | struct mem_cgroup_reclaim_iter iter; |
| 130 | 129 | ||
| 131 | struct memcg_shrinker_map __rcu *shrinker_map; | 130 | struct memcg_shrinker_map __rcu *shrinker_map; |
| 132 | 131 | ||