aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2015-12-11 16:40:29 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-12-12 13:15:34 -0500
commit475a2f905d5a41d5fc569ef21841be67d0a7f788 (patch)
tree73e672a2d9894026016772113420304c1bd6f0a3
parent9516a18a9a253a94292e74f11f92083126c5a237 (diff)
mm: fix swapped Movable and Reclaimable in /proc/pagetypeinfo
Commit 016c13daa5c9 ("mm, page_alloc: use masks and shifts when converting GFP flags to migrate types") has swapped MIGRATE_MOVABLE and MIGRATE_RECLAIMABLE in the enum definition. However, migratetype_names wasn't updated to reflect that. As a result, the file /proc/pagetypeinfo shows the counts for Movable as Reclaimable and vice versa. Additionally, commit 0aaa29a56e4f ("mm, page_alloc: reserve pageblocks for high-order atomic allocations on demand") introduced MIGRATE_HIGHATOMIC, but did not add a letter to distinguish it into show_migration_types(), so it doesn't appear in the listing of free areas during page alloc failures or oom kills. This patch fixes both problems. The atomic reserves will show with a letter 'H' in the free areas listings. Fixes: 016c13daa5c9 ("mm, page_alloc: use masks and shifts when converting GFP flags to migrate types") Fixes: 0aaa29a56e4f ("mm, page_alloc: reserve pageblocks for high-order atomic allocations on demand") Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/page_alloc.c3
-rw-r--r--mm/vmstat.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 17a3c66639a9..9d666df5ef95 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3647,8 +3647,9 @@ static void show_migration_types(unsigned char type)
3647{ 3647{
3648 static const char types[MIGRATE_TYPES] = { 3648 static const char types[MIGRATE_TYPES] = {
3649 [MIGRATE_UNMOVABLE] = 'U', 3649 [MIGRATE_UNMOVABLE] = 'U',
3650 [MIGRATE_RECLAIMABLE] = 'E',
3651 [MIGRATE_MOVABLE] = 'M', 3650 [MIGRATE_MOVABLE] = 'M',
3651 [MIGRATE_RECLAIMABLE] = 'E',
3652 [MIGRATE_HIGHATOMIC] = 'H',
3652#ifdef CONFIG_CMA 3653#ifdef CONFIG_CMA
3653 [MIGRATE_CMA] = 'C', 3654 [MIGRATE_CMA] = 'C',
3654#endif 3655#endif
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 879a2be23325..2ec34342a87b 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -921,8 +921,8 @@ static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat,
921#ifdef CONFIG_PROC_FS 921#ifdef CONFIG_PROC_FS
922static char * const migratetype_names[MIGRATE_TYPES] = { 922static char * const migratetype_names[MIGRATE_TYPES] = {
923 "Unmovable", 923 "Unmovable",
924 "Reclaimable",
925 "Movable", 924 "Movable",
925 "Reclaimable",
926 "HighAtomic", 926 "HighAtomic",
927#ifdef CONFIG_CMA 927#ifdef CONFIG_CMA
928 "CMA", 928 "CMA",