Re: [PATCH 8/8] Add VM counters for transparent hugepages

From: KOSAKI Motohiro
Date: Mon Mar 07 2011 - 03:28:54 EST


> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> I found it difficult to make sense of transparent huge pages without
> having any counters for its actions. Add some counters to vmstat
> for allocation of transparent hugepages and fallback to smaller
> pages.
>
> Optional patch, but useful for development and understanding the system.
>
> Contains improvements from Andrea Arcangeli and Johannes Weiner
>
> Acked-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> ---
> include/linux/vmstat.h | 7 +++++++
> mm/huge_memory.c | 25 +++++++++++++++++++++----
> mm/vmstat.c | 8 ++++++++
> 3 files changed, 36 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
> index 9b5c63d..074e8fd 100644
> --- a/include/linux/vmstat.h
> +++ b/include/linux/vmstat.h
> @@ -58,6 +58,13 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
> UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
> UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
> UNEVICTABLE_MLOCKFREED,
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> + THP_FAULT_ALLOC,
> + THP_FAULT_FALLBACK,
> + THP_COLLAPSE_ALLOC,
> + THP_COLLAPSE_ALLOC_FAILED,
> + THP_SPLIT,
> +#endif
> NR_VM_EVENT_ITEMS
> };

Hmm...
Don't we need to make per zone stastics? I'm afraid small dma zone
makes much thp-splitting and screw up this stastics.

only nit.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/