From: hannes@saeurebad.de
To: LKML <linux-kernel@vger.kernel.org>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Subject: [patch 09/22 -v2] m32r: Use generic show_mem()
Date: Fri, 04 Apr 2008 13:51:46 +0200 [thread overview]
Message-ID: <20080404115231.894558747@skyscraper.fehenstaub.lan> (raw)
In-Reply-To: <20080404115137.397502419@skyscraper.fehenstaub.lan>
[-- Attachment #1: m32r-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1879 bytes --]
Remove arch-specific show_mem() in favor of the generic version.
This also removes the following redundant information display:
- 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: Hirokazu Takata <takata@linux-m32r.org>
---
Index: tree-linus/arch/m32r/Kconfig
===================================================================
--- tree-linus.orig/arch/m32r/Kconfig
+++ tree-linus/arch/m32r/Kconfig
@@ -10,7 +10,6 @@ config M32R
default y
select HAVE_IDE
select HAVE_OPROFILE
- select HAVE_ARCH_SHOW_MEM
config SBUS
bool
Index: tree-linus/arch/m32r/mm/init.c
===================================================================
--- tree-linus.orig/arch/m32r/mm/init.c
+++ tree-linus/arch/m32r/mm/init.c
@@ -36,41 +36,6 @@ pgd_t swapper_pg_dir[1024];
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
-void show_mem(void)
-{
- int total = 0, reserved = 0;
- int shared = 0, cached = 0;
- int highmem = 0;
- struct page *page;
- pg_data_t *pgdat;
- unsigned long i;
-
- printk("Mem-info:\n");
- show_free_areas();
- for_each_online_pgdat(pgdat) {
- unsigned long flags;
- pgdat_resize_lock(pgdat, &flags);
- for (i = 0; i < pgdat->node_spanned_pages; ++i) {
- page = pgdat_page_nr(pgdat, i);
- total++;
- if (PageHighMem(page))
- highmem++;
- if (PageReserved(page))
- reserved++;
- else if (PageSwapCache(page))
- cached++;
- else if (page_count(page))
- shared += page_count(page) - 1;
- }
- pgdat_resize_unlock(pgdat, &flags);
- }
- printk("%d pages of RAM\n", total);
- printk("%d pages of HIGHMEM\n",highmem);
- printk("%d reserved pages\n",reserved);
- printk("%d pages shared\n",shared);
- printk("%d pages swap cached\n",cached);
-}
-
/*
* Cache of MMU context last used.
*/
--
next prev parent reply other threads:[~2008-04-04 13:02 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
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 11:51 ` [patch 08/22 -v2] h8300: " hannes
2008-04-04 11:51 ` hannes [this message]
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 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
2008-04-04 14:30 ` [patch 07/22 -v2] frv: " David Howells
2008-04-04 14:30 ` [patch 13/22 -v2] mn10300: " David Howells
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=20080404115231.894558747@skyscraper.fehenstaub.lan \
--to=hannes@saeurebad.de \
--cc=linux-kernel@vger.kernel.org \
--cc=takata@linux-m32r.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®