lkml.org 
[lkml]   [2009]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] add NR_ANON_PAGES to OOM log
On Sun, Jul 05, 2009 at 08:21:20PM +0800, KOSAKI Motohiro wrote:
> > On Sun, Jul 05, 2009 at 05:26:18PM +0800, KOSAKI Motohiro wrote:
> > > Subject: [PATCH] add NR_ANON_PAGES to OOM log
> > >
> > > show_free_areas can display NR_FILE_PAGES, but it can't display
> > > NR_ANON_PAGES.
> > >
> > > this patch fix its inconsistency.
> > >
> > >
> > > Reported-by: Wu Fengguang <fengguang.wu@gmail.com>
> > > Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > ---
> > > mm/page_alloc.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > Index: b/mm/page_alloc.c
> > > ===================================================================
> > > --- a/mm/page_alloc.c
> > > +++ b/mm/page_alloc.c
> > > @@ -2216,6 +2216,7 @@ void show_free_areas(void)
> > > printk("= %lukB\n", K(total));
> > > }
> > >
> > > + printk("%ld total anon pages\n", global_page_state(NR_ANON_PAGES));
> > > printk("%ld total pagecache pages\n", global_page_state(NR_FILE_PAGES));
> >
> > Can we put related items together, ie. this looks more friendly:
> >
> > Anon:XXX active_anon:XXX inactive_anon:XXX
> > File:XXX active_file:XXX inactive_file:XXX
>
> hmmm. Actually NR_ACTIVE_ANON + NR_INACTIVE_ANON != NR_ANON_PAGES.
> tmpfs pages are accounted as FILE, but it is stay in anon lru.

Right, that's exactly the reason I propose to put them together: to
make the number of tmpfs pages obvious.

> I think your proposed format easily makes confusion. this format cause to
> imazine Anon = active_anon + inactive_anon.

Yes it may confuse normal users :(

> At least, we need to use another name, I think.

Hmm I find it hard to work out a good name.

But instead, it may be a good idea to explicitly compute the tmpfs
pages, because the excessive use of tmpfs pages could be a common
reason of OOM.

Thanks,
Fengguang


\
 
 \ /
  Last update: 2009-07-05 15:05    [W:0.093 / U:0.032 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site