From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755739AbZGEOQe (ORCPT ); Sun, 5 Jul 2009 10:16:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752729AbZGEOQY (ORCPT ); Sun, 5 Jul 2009 10:16:24 -0400 Received: from mail-vw0-f202.google.com ([209.85.212.202]:43573 "EHLO mail-vw0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752052AbZGEOQY convert rfc822-to-8bit (ORCPT ); Sun, 5 Jul 2009 10:16:24 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=DZh0wmrg7xmDo1DeFsEWSPo1iLfagO6jvDeIx+2cP/H1i5VhyR1JE4W4KmVpAJlmEj PWbXCzvOh0m8jt0zlW8Mo4H7IMRiHFbDBY95S28XyyX3TumWk1t76oWUjqIzVkW/sMU+ y69mDhXMjr32BvKHwxl0HbxijcZbDOXDQ0MGU= MIME-Version: 1.0 In-Reply-To: <20090705182337.08F9.A69D9226@jp.fujitsu.com> References: <20090705181400.08F1.A69D9226@jp.fujitsu.com> <20090705182337.08F9.A69D9226@jp.fujitsu.com> Date: Sun, 5 Jul 2009 23:16:27 +0900 Message-ID: <28c262360907050716x28671070of7ab21556213b337@mail.gmail.com> Subject: Re: [PATCH 2/5] add buffer cache information to show_free_areas() From: Minchan Kim To: KOSAKI Motohiro Cc: LKML , linux-mm , Andrew Morton , Wu Fengguang , Christoph Lameter , David Rientjes , Rik van Riel Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 5, 2009 at 6:24 PM, KOSAKI Motohiro wrote: > Subject: [PATCH] add buffer cache information to show_free_areas() > > When administrator analysis memory shortage reason from OOM log, They > often need to know rest number of cache like pages. > > Then, show_free_areas() shouldn't only display page cache, but also it > should display buffer cache. > > > Signed-off-by: KOSAKI Motohiro > --- >  mm/page_alloc.c |    3 ++- >  1 file changed, 2 insertions(+), 1 deletion(-) > > Index: b/mm/page_alloc.c > =================================================================== > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -2118,7 +2118,7 @@ void show_free_areas(void) >        printk("Active_anon:%lu active_file:%lu inactive_anon:%lu\n" >                " inactive_file:%lu" >                " unevictable:%lu" > -               " dirty:%lu writeback:%lu unstable:%lu\n" > +               " dirty:%lu writeback:%lu buffer:%lu unstable:%lu\n" >                " free:%lu slab_reclaimable:%lu slab_unreclaimable:%lu\n" >                " mapped:%lu pagetables:%lu bounce:%lu\n", >                global_page_state(NR_ACTIVE_ANON), > @@ -2128,6 +2128,7 @@ void show_free_areas(void) >                global_page_state(NR_UNEVICTABLE), >                global_page_state(NR_FILE_DIRTY), >                global_page_state(NR_WRITEBACK), > +               K(nr_blockdev_pages()), Why do you show the number with kilobyte unit ? Others are already number of pages. Do you have any reason ? -- Kind regards, Minchan Kim From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id C15BB6B004F for ; Sun, 5 Jul 2009 13:46:06 -0400 (EDT) Received: by vwj42 with SMTP id 42so2417396vwj.12 for ; Sun, 05 Jul 2009 07:16:27 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090705182337.08F9.A69D9226@jp.fujitsu.com> References: <20090705181400.08F1.A69D9226@jp.fujitsu.com> <20090705182337.08F9.A69D9226@jp.fujitsu.com> Date: Sun, 5 Jul 2009 23:16:27 +0900 Message-ID: <28c262360907050716x28671070of7ab21556213b337@mail.gmail.com> Subject: Re: [PATCH 2/5] add buffer cache information to show_free_areas() From: Minchan Kim Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org To: KOSAKI Motohiro Cc: LKML , linux-mm , Andrew Morton , Wu Fengguang , Christoph Lameter , David Rientjes , Rik van Riel List-ID: On Sun, Jul 5, 2009 at 6:24 PM, KOSAKI Motohiro wrote: > Subject: [PATCH] add buffer cache information to show_free_areas() > > When administrator analysis memory shortage reason from OOM log, They > often need to know rest number of cache like pages. > > Then, show_free_areas() shouldn't only display page cache, but also it > should display buffer cache. > > > Signed-off-by: KOSAKI Motohiro > --- > =C2=A0mm/page_alloc.c | =C2=A0 =C2=A03 ++- > =C2=A01 file changed, 2 insertions(+), 1 deletion(-) > > Index: b/mm/page_alloc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -2118,7 +2118,7 @@ void show_free_areas(void) > =C2=A0 =C2=A0 =C2=A0 =C2=A0printk("Active_anon:%lu active_file:%lu inacti= ve_anon:%lu\n" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0" inactive_file:%l= u" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0" unevictable:%lu" > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " dirty:%lu writeback:= %lu unstable:%lu\n" > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " dirty:%lu writeback:= %lu buffer:%lu unstable:%lu\n" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0" free:%lu slab_re= claimable:%lu slab_unreclaimable:%lu\n" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0" mapped:%lu paget= ables:%lu bounce:%lu\n", > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global_page_state(= NR_ACTIVE_ANON), > @@ -2128,6 +2128,7 @@ void show_free_areas(void) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global_page_state(= NR_UNEVICTABLE), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global_page_state(= NR_FILE_DIRTY), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global_page_state(= NR_WRITEBACK), > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 K(nr_blockdev_pages())= , Why do you show the number with kilobyte unit ? Others are already number of pages. Do you have any reason ? --=20 Kind regards, Minchan Kim -- 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: email@kvack.org