From: Bartlomiej Zolnierkiewicz <[email protected]>
Subject: [PATCH] mm: compaction: add /proc/vmstat entry for rescued MIGRATE_UNMOVABLE pageblocks
compact_rescued_unmovable_blocks shows the number of MIGRATE_UNMOVABLE
pageblocks converted back to MIGRATE_MOVABLE type by the memory compaction
code. Non-zero values indicate that large kernel-originated allocations
of MIGRATE_UNMOVABLE type happen in the system and need special handling
from the memory compaction code.
This new vmstat entry is optional but useful for development and understanding
the system.
Cc: Hugh Dickins <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Dave Jones <[email protected]>
Cc: Cong Wang <[email protected]>
Cc: Markus Trippelsdorf <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
---
include/linux/vm_event_item.h | 1 +
mm/compaction.c | 2 ++
mm/vmstat.c | 1 +
3 files changed, 4 insertions(+)
Index: b/include/linux/vm_event_item.h
===================================================================
--- a/include/linux/vm_event_item.h 2012-06-14 11:28:48.812775316 +0200
+++ b/include/linux/vm_event_item.h 2012-06-14 11:31:17.132775300 +0200
@@ -39,6 +39,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PS
#ifdef CONFIG_COMPACTION
COMPACTBLOCKS, COMPACTPAGES, COMPACTPAGEFAILED,
COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS,
+ COMPACT_RESCUED_UNMOVABLE_BLOCKS,
#endif
#ifdef CONFIG_HUGETLB_PAGE
HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
Index: b/mm/compaction.c
===================================================================
--- a/mm/compaction.c 2012-06-14 11:31:24.800775299 +0200
+++ b/mm/compaction.c 2012-06-14 11:31:31.612775298 +0200
@@ -387,6 +387,8 @@ static void rescue_unmovable_pageblock(s
{
set_pageblock_migratetype(page, MIGRATE_MOVABLE);
move_freepages_block(page_zone(page), page, MIGRATE_MOVABLE);
+
+ count_vm_event(COMPACT_RESCUED_UNMOVABLE_BLOCKS);
}
/*
Index: b/mm/vmstat.c
===================================================================
--- a/mm/vmstat.c 2012-06-14 11:28:48.824775319 +0200
+++ b/mm/vmstat.c 2012-06-14 11:31:17.132775300 +0200
@@ -767,6 +767,7 @@ const char * const vmstat_text[] = {
"compact_stall",
"compact_fail",
"compact_success",
+ "compact_rescued_unmovable_blocks",
#endif
#ifdef CONFIG_HUGETLB_PAGE
(6/14/12 12:02 PM), Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz<[email protected]>
> Subject: [PATCH] mm: compaction: add /proc/vmstat entry for rescued MIGRATE_UNMOVABLE pageblocks
>
> compact_rescued_unmovable_blocks shows the number of MIGRATE_UNMOVABLE
> pageblocks converted back to MIGRATE_MOVABLE type by the memory compaction
> code. Non-zero values indicate that large kernel-originated allocations
> of MIGRATE_UNMOVABLE type happen in the system and need special handling
> from the memory compaction code.
>
> This new vmstat entry is optional but useful for development and understanding
> the system.
This description don't describe why admin need this stat and how to use it.
On Thu, 14 Jun 2012 12:21:22 -0400
KOSAKI Motohiro <[email protected]> wrote:
> (6/14/12 12:02 PM), Bartlomiej Zolnierkiewicz wrote:
> > From: Bartlomiej Zolnierkiewicz<[email protected]>
> > Subject: [PATCH] mm: compaction: add /proc/vmstat entry for rescued MIGRATE_UNMOVABLE pageblocks
> >
> > compact_rescued_unmovable_blocks shows the number of MIGRATE_UNMOVABLE
> > pageblocks converted back to MIGRATE_MOVABLE type by the memory compaction
> > code. Non-zero values indicate that large kernel-originated allocations
> > of MIGRATE_UNMOVABLE type happen in the system and need special handling
> > from the memory compaction code.
> >
> > This new vmstat entry is optional but useful for development and understanding
> > the system.
>
> This description don't describe why admin need this stat and how to use it.
>
Was there a response to this?
patch [1/2] doesn't apply. Refresh and resend the series, please?