* [PATCH] mm: fix swapped Movable and Reclaimable in /proc/pagetypeinfo
@ 2015-11-23 16:22 Vlastimil Babka
2015-11-23 16:53 ` [PATCH v2] " Vlastimil Babka
0 siblings, 1 reply; 4+ messages in thread
From: Vlastimil Babka @ 2015-11-23 16:22 UTC (permalink / raw)
To: Andrew Morton, Mel Gorman; +Cc: linux-mm, linux-kernel, Vlastimil Babka
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: 016c13daa5c9e4827eca703e2f0621c131f2cca3
Fixes: 0aaa29a56e4fb0fc9e24edb649e2733a672ca099
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
mm/page_alloc.c | 3 ++-
mm/vmstat.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 17a3c66..165980d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3647,8 +3647,9 @@ static void show_migration_types(unsigned char type)
{
static const char types[MIGRATE_TYPES] = {
[MIGRATE_UNMOVABLE] = 'U',
- [MIGRATE_RECLAIMABLE] = 'E',
[MIGRATE_MOVABLE] = 'M',
+ [MIGRATE_RECLAIMABLE] = 'E',
+ [MIGRATE_HIGHATOMIC] = 'H'
#ifdef CONFIG_CMA
[MIGRATE_CMA] = 'C',
#endif
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 879a2be..2ec3434 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,
#ifdef CONFIG_PROC_FS
static char * const migratetype_names[MIGRATE_TYPES] = {
"Unmovable",
- "Reclaimable",
"Movable",
+ "Reclaimable",
"HighAtomic",
#ifdef CONFIG_CMA
"CMA",
--
2.6.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] mm: fix swapped Movable and Reclaimable in /proc/pagetypeinfo
2015-11-23 16:22 [PATCH] mm: fix swapped Movable and Reclaimable in /proc/pagetypeinfo Vlastimil Babka
@ 2015-11-23 16:53 ` Vlastimil Babka
2015-11-25 11:29 ` Mel Gorman
0 siblings, 1 reply; 4+ messages in thread
From: Vlastimil Babka @ 2015-11-23 16:53 UTC (permalink / raw)
To: Andrew Morton, Mel Gorman; +Cc: linux-mm, linux-kernel, Vlastimil Babka
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: 016c13daa5c9e4827eca703e2f0621c131f2cca3
Fixes: 0aaa29a56e4fb0fc9e24edb649e2733a672ca099
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
Bah, forgot a comma in the previous patch. BTW this is for 4.4, fixes rc1 bugs.
mm/page_alloc.c | 3 ++-
mm/vmstat.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 17a3c66..9d666df 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3647,8 +3647,9 @@ static void show_migration_types(unsigned char type)
{
static const char types[MIGRATE_TYPES] = {
[MIGRATE_UNMOVABLE] = 'U',
- [MIGRATE_RECLAIMABLE] = 'E',
[MIGRATE_MOVABLE] = 'M',
+ [MIGRATE_RECLAIMABLE] = 'E',
+ [MIGRATE_HIGHATOMIC] = 'H',
#ifdef CONFIG_CMA
[MIGRATE_CMA] = 'C',
#endif
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 879a2be..2ec3434 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,
#ifdef CONFIG_PROC_FS
static char * const migratetype_names[MIGRATE_TYPES] = {
"Unmovable",
- "Reclaimable",
"Movable",
+ "Reclaimable",
"HighAtomic",
#ifdef CONFIG_CMA
"CMA",
--
2.6.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] mm: fix swapped Movable and Reclaimable in /proc/pagetypeinfo
2015-11-23 16:53 ` [PATCH v2] " Vlastimil Babka
@ 2015-11-25 11:29 ` Mel Gorman
0 siblings, 0 replies; 4+ messages in thread
From: Mel Gorman @ 2015-11-25 11:29 UTC (permalink / raw)
To: Vlastimil Babka; +Cc: Andrew Morton, linux-mm, linux-kernel
On Mon, Nov 23, 2015 at 05:53:10PM +0100, Vlastimil Babka wrote:
> 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: 016c13daa5c9e4827eca703e2f0621c131f2cca3
> Fixes: 0aaa29a56e4fb0fc9e24edb649e2733a672ca099
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Thanks
Acked-by: Mel Gorman <mgorman@suse.de>
--
Mel Gorman
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] mm: fix swapped Movable and Reclaimable in /proc/pagetypeinfo
@ 2015-11-24 8:57 Hillf Danton
0 siblings, 0 replies; 4+ messages in thread
From: Hillf Danton @ 2015-11-24 8:57 UTC (permalink / raw)
To: Vlastimil Babka; +Cc: linux-kernel, linux-mm
> Fixes: 016c13daa5c9e4827eca703e2f0621c131f2cca3
> Fixes: 0aaa29a56e4fb0fc9e24edb649e2733a672ca099
The correct format of the tag is
Fixes: commit id ("commit subject")
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-25 11:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-23 16:22 [PATCH] mm: fix swapped Movable and Reclaimable in /proc/pagetypeinfo Vlastimil Babka
2015-11-23 16:53 ` [PATCH v2] " Vlastimil Babka
2015-11-25 11:29 ` Mel Gorman
2015-11-24 8:57 Hillf Danton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox