From: hannes@saeurebad.de
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Subject: [patch 12/22 -v2] mips: Use generic show_mem()
Date: Fri, 04 Apr 2008 13:51:49 +0200 [thread overview]
Message-ID: <20080404115232.333370239@skyscraper.fehenstaub.lan> (raw)
In-Reply-To: <20080404115137.397502419@skyscraper.fehenstaub.lan>
[-- Attachment #1: mips-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 2332 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().
And show_mem() does now actually print something on configurations
with multiple nodes.
Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
---
Index: tree-linus/arch/mips/Kconfig
===================================================================
--- tree-linus.orig/arch/mips/Kconfig
+++ tree-linus/arch/mips/Kconfig
@@ -6,7 +6,6 @@ config MIPS
# Horrible source of confusion. Die, die, die ...
select EMBEDDED
select RTC_LIB
- select HAVE_ARCH_SHOW_MEM
mainmenu "Linux/MIPS Kernel Configuration"
Index: tree-linus/arch/mips/mm/Makefile
===================================================================
--- tree-linus.orig/arch/mips/mm/Makefile
+++ tree-linus/arch/mips/mm/Makefile
@@ -3,8 +3,7 @@
#
obj-y += cache.o dma-default.o extable.o fault.o \
- init.o pgtable.o tlbex.o tlbex-fault.o \
- uasm.o
+ init.o tlbex.o tlbex-fault.o uasm.o
obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o
obj-$(CONFIG_64BIT) += pgtable-64.o
Index: tree-linus/arch/mips/mm/pgtable.c
===================================================================
--- tree-linus.orig/arch/mips/mm/pgtable.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/swap.h>
-
-void show_mem(void)
-{
-#ifndef CONFIG_NEED_MULTIPLE_NODES /* XXX(hch): later.. */
- int pfn, total = 0, reserved = 0;
- int shared = 0, cached = 0;
- int highmem = 0;
- struct page *page;
-
- printk("Mem-info:\n");
- show_free_areas();
- pfn = max_mapnr;
- while (pfn-- > 0) {
- if (!pfn_valid(pfn))
- continue;
- page = pfn_to_page(pfn);
- total++;
- if (PageHighMem(page))
- highmem++;
- if (PageReserved(page))
- reserved++;
- else if (PageSwapCache(page))
- cached++;
- else if (page_count(page))
- shared += page_count(page) - 1;
- }
- 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);
-#endif
-}
--
next prev parent reply other threads:[~2008-04-04 13:03 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 ` [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 ` hannes [this message]
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=20080404115232.333370239@skyscraper.fehenstaub.lan \
--to=hannes@saeurebad.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ralf@linux-mips.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
Powered by JetHome