[lkml]   [2017]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Re: [PATCH] mm/vmstats: add counters for the page frag cache
Thanks for your reply,
But I couldn't find "NR_FRAGMENT_PAGES" in linux-next.git .. is that
vmstat counter? or others?

As you know, page_frag_alloc() directly calls __alloc_pages_nodemask()
so that makes too difficult to see memory usage in real time even though
we have "/meminfo or /slabinfo.." information.
If there was a way already to figure out the memory leakage from
page_frag_cache in mainline, I agree your opinion
but I think we don't have it now.

If those counters too much in my patch,
I can say two values (pgfrag_alloc and pgfrag_free) are enough to guess
what will happen
and would remove pgfrag_alloc_calls and pgfrag_free_calls.

Kyeongdon Kim

On 2017-09-01 오후 6:12, Konstantin Khlebnikov wrote:
> IMHO that's too much counters.
> Per-node NR_FRAGMENT_PAGES should be enough for guessing what's going on.
> Perf probes provides enough features for furhter debugging.
> On 01.09.2017 02:37, Kyeongdon Kim wrote:
> > There was a memory leak problem when we did stressful test
> > on Android device.
> > The root cause of this was from page_frag_cache alloc
> > and it was very hard to find out.
> >
> > We add to count the page frag allocation and free with function call.
> > The gap between pgfrag_alloc and pgfrag_free is good to to calculate
> > for the amount of page.
> > The gap between pgfrag_alloc_calls and pgfrag_free_calls is for
> > sub-indicator.
> > They can see trends of memory usage during the test.
> > Without it, it's difficult to check page frag usage so I believe we
> > should add it.
> >
> > Signed-off-by: Kyeongdon Kim <>
> > ---

 \ /
  Last update: 2017-09-04 03:35    [W:0.092 / U:1.588 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site