All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bryan Wu" <cooloney@kernel.org>
To: hannes@saeurebad.de
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch 05/22 -v2] blackfin: Use generic show_mem()
Date: Fri, 4 Apr 2008 07:43:18 -0700	[thread overview]
Message-ID: <386072610804040743t162cce4ap5ef6ec178374ce0e@mail.gmail.com> (raw)
In-Reply-To: <20080404115231.308257293@skyscraper.fehenstaub.lan>

On Fri, Apr 4, 2008 at 4:51 AM,  <hannes@saeurebad.de> wrote:
> Remove arch-specific show_mem() in favor of the generic version.
>
>  This also removes the following redundant information display:
>
>         - free pages, printed by show_free_areas()
>         - pages in swapcache, printed by show_swap_cache_info()
>
>  where show_mem() calls show_free_areas(), which calls
>  show_swap_cache_info().
>
>  Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
>  CC: Bryan Wu <cooloney@kernel.org>
>  ---
>
>  Index: tree-linus/arch/blackfin/Kconfig
>  ===================================================================
>  --- tree-linus.orig/arch/blackfin/Kconfig
>  +++ tree-linus/arch/blackfin/Kconfig
>  @@ -26,7 +26,6 @@ config BLACKFIN
>         default y
>         select HAVE_IDE
>         select HAVE_OPROFILE
>  -       select HAVE_ARCH_SHOW_MEM
>
>   config ZONE_DMA
>         bool
>  Index: tree-linus/arch/blackfin/mm/init.c
>  ===================================================================
>  --- tree-linus.orig/arch/blackfin/mm/init.c
>  +++ tree-linus/arch/blackfin/mm/init.c
>  @@ -53,33 +53,6 @@ static unsigned long empty_bad_page;
>
>   unsigned long empty_zero_page;
>
>  -void show_mem(void)
>  -{
>  -       unsigned long i;
>  -       int free = 0, total = 0, reserved = 0, shared = 0;
>  -
>  -       int cached = 0;
>  -       printk(KERN_INFO "Mem-info:\n");
>  -       show_free_areas();
>  -       i = max_mapnr;
>  -       while (i-- > 0) {
>  -               total++;
>  -               if (PageReserved(mem_map + i))
>  -                       reserved++;
>  -               else if (PageSwapCache(mem_map + i))
>  -                       cached++;
>  -               else if (!page_count(mem_map + i))
>  -                       free++;
>  -               else
>  -                       shared += page_count(mem_map + i) - 1;
>  -       }
>  -       printk(KERN_INFO "%d pages of RAM\n", total);
>  -       printk(KERN_INFO "%d free pages\n", free);
>  -       printk(KERN_INFO "%d reserved pages\n", reserved);
>  -       printk(KERN_INFO "%d pages shared\n", shared);
>  -       printk(KERN_INFO "%d pages swap cached\n", cached);
>  -}
>  -
>   /*
>   * paging_init() continues the virtual memory environment setup which
>   * was begun by the code in arch/head.S.
>

Thanks
Acked-by: Bryan Wu <cooloney@kernel.org>

-Bryan

  reply	other threads:[~2008-04-04 14:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 11:51 [patch 00/22 -v2] Generic show_mem() hannes
2008-04-04 11:51 ` [patch 01/22 -v2] Print current swapcache page count in show_swap_cache_info() hannes
2008-04-04 11:51 ` [patch 02/22 -v2] Generic show_mem() implementation hannes
2008-04-04 11:51 ` [patch 03/22 -v2] alpha: Use generic show_mem() hannes
2008-04-04 11:51 ` [patch 04/22 -v2] avr32: " hannes
2008-04-06 22:03   ` Haavard Skinnemoen
2008-04-04 11:51 ` [patch 05/22 -v2] blackfin: " hannes
2008-04-04 14:43   ` Bryan Wu [this message]
2008-04-04 11:51 ` [patch 06/22 -v2] cris: " hannes
2008-04-04 11:51 ` [patch 07/22 -v2] frv: " hannes
2008-04-04 14:30   ` David Howells
2008-04-04 11:51 ` [patch 08/22 -v2] h8300: " hannes
2008-04-04 11:51 ` [patch 09/22 -v2] m32r: " hannes
2008-04-04 11:51 ` [patch 10/22 -v2] m68k: " hannes
2008-04-04 11:51 ` [patch 11/22 -v2] m68knommu: " hannes
2008-04-04 11:51 ` [patch 12/22 -v2] mips: " hannes
2008-04-04 11:51 ` [patch 13/22 -v2] mn10300: " hannes
2008-04-04 14:30   ` David Howells
2008-04-04 11:51 ` [patch 14/22 -v2] powerpc: " hannes
2008-04-04 11:51 ` [patch 15/22 -v2] ppc: " hannes
2008-04-04 11:51 ` [patch 16/22 -v2] s390: " hannes
2008-04-04 11:51 ` [patch 17/22 -v2] sh: " hannes
2008-04-07  1:29   ` Paul Mundt
2008-04-04 11:51 ` [patch 18/22 -v2] sparc64: " hannes
2008-04-04 11:51 ` [patch 19/22 -v2] um: " hannes
2008-04-04 11:51 ` [patch 20/22 -v2] v850: " hannes
2008-04-04 11:51 ` [patch 21/22 -v2] x86: " hannes
2008-04-04 11:51 ` [patch 22/22 -v2] xtensa: " hannes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=386072610804040743t162cce4ap5ef6ec178374ce0e@mail.gmail.com \
    --to=cooloney@kernel.org \
    --cc=hannes@saeurebad.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.