linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/20] generic show_mem() v5
@ 2008-07-04 16:07 Johannes Weiner
  2008-07-04 16:07 ` [PATCH 01/20] mm: print swapcache page count in show_swap_cache_info() Johannes Weiner
                   ` (20 more replies)
  0 siblings, 21 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch

Every arch implements its own show_mem() function.  Most of them share
quite some code, some of them are completely identical.

This series implements a generic version of this function and migrates
almost all architectures to it.

version 5:
	- removed the Kconfig parts and moved generic version to lib/
	  as suggested by Paul Mundt.  We now touch half the files and
	  save even more lines!
version 4:
	- rebased against -mmotm
	- remove free swap space display from alpha, m32r, sh, sparc64,
	  um (was in a different series originally, but -mm no longer
	  has them and Linus' tree does not contain them too)
version 3:
	- Fix kbuild logic as suggested by Sam Ravnborg
version 2:
	- Fix kbuild bits as suggested by Heiko Carstens
	- Include quicklist info as suggested by Paul Mundt
	- Extend changelogs by info on removal of redundant output

Compile- and runtime-tested on x86_32.

 arch/alpha/mm/init.c      |   30 ---------------------
 arch/alpha/mm/numa.c      |   35 -------------------------
 arch/avr32/mm/init.c      |   39 ---------------------------
 arch/blackfin/mm/init.c   |   27 -------------------
 arch/cris/mm/init.c       |   30 ---------------------
 arch/frv/mm/init.c        |   31 ----------------------
 arch/h8300/mm/init.c      |   27 -------------------
 arch/m32r/mm/init.c       |   36 -------------------------
 arch/m68k/mm/init.c       |   30 ---------------------
 arch/m68knommu/mm/init.c  |   27 -------------------
 arch/mips/mm/Makefile     |    3 +-
 arch/mips/mm/pgtable.c    |   36 -------------------------
 arch/mn10300/mm/pgtable.c |   27 -------------------
 arch/powerpc/mm/mem.c     |   39 ---------------------------
 arch/s390/mm/init.c       |   32 -----------------------
 arch/sh/mm/init.c         |   41 -----------------------------
 arch/sparc64/mm/init.c    |   45 --------------------------------
 arch/um/kernel/mem.c      |   31 ----------------------
 arch/x86/mm/init_64.c     |   37 --------------------------
 arch/x86/mm/pgtable_32.c  |   47 ---------------------------------
 arch/xtensa/mm/init.c     |   26 ------------------
 lib/Makefile              |    2 +-
 lib/show_mem.c            |   63 +++++++++++++++++++++++++++++++++++++++++++++
 mm/swap_state.c           |    3 +-
 24 files changed, 67 insertions(+), 677 deletions(-)

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 01/20] mm: print swapcache page count in show_swap_cache_info()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 02/20] lib: generic show_mem() Johannes Weiner
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch

[-- Attachment #1: mm-show-swapcache-pages-in-show_swap_cache_info.patch --]
[-- Type: text/plain, Size: 834 bytes --]

Most show_mem() implementations calculate the amount of pages within
the swapcache every time.  Move the output to a more appropriate place
and use the anyway available total_swapcache_pages variable.

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
---
 mm/swap_state.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -56,7 +56,8 @@ static struct {
 
 void show_swap_cache_info(void)
 {
-	printk("Swap cache: add %lu, delete %lu, find %lu/%lu\n",
+	printk("%lu pages in swap cache\n", total_swapcache_pages);
+	printk("Swap cache stats: add %lu, delete %lu, find %lu/%lu\n",
 		swap_cache_info.add_total, swap_cache_info.del_total,
 		swap_cache_info.find_success, swap_cache_info.find_total);
 	printk("Free swap  = %lukB\n", nr_swap_pages << (PAGE_SHIFT - 10));

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 02/20] lib: generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
  2008-07-04 16:07 ` [PATCH 01/20] mm: print swapcache page count in show_swap_cache_info() Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-05  8:34   ` Heiko Carstens
  2008-07-04 16:07 ` [PATCH 03/20] alpha: use " Johannes Weiner
                   ` (18 subsequent siblings)
  20 siblings, 1 reply; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch

[-- Attachment #1: lib-generic-show_mem.patch --]
[-- Type: text/plain, Size: 2240 bytes --]

This implements a platform-independent version of show_mem().

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
---
 lib/Makefile   |    2 -
 lib/show_mem.c |   63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 1 deletion(-)

--- a/lib/Makefile
+++ b/lib/Makefile
@@ -6,7 +6,7 @@ lib-y := ctype.o string.o vsprintf.o cmd
 	 rbtree.o radix-tree.o dump_stack.o \
 	 idr.o int_sqrt.o extable.o prio_tree.o \
 	 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
-	 proportions.o prio_heap.o ratelimit.o
+	 proportions.o prio_heap.o ratelimit.o show_mem.o
 
 ifdef CONFIG_FTRACE
 # Do not profile string.o, since it may be used in early boot or vdso
--- /dev/null
+++ b/lib/show_mem.c
@@ -0,0 +1,63 @@
+/*
+ * Generic show_mem() implementation
+ *
+ * Copyright (C) 2008 Johannes Weiner <hannes@saeurebad.de>
+ * All code subject to the GPL version 2.
+ */
+
+#include <linux/mm.h>
+#include <linux/nmi.h>
+#include <linux/quicklist.h>
+
+void show_mem(void)
+{
+	pg_data_t *pgdat;
+	unsigned long total = 0, reserved = 0, shared = 0,
+		nonshared = 0, highmem = 0;
+
+	printk(KERN_INFO "Mem-Info:\n");
+	show_free_areas();
+
+	for_each_online_pgdat(pgdat) {
+		unsigned long i, flags;
+
+		pgdat_resize_lock(pgdat, &flags);
+		for (i = 0; i < pgdat->node_spanned_pages; i++) {
+			struct page *page;
+			unsigned long pfn = pgdat->node_start_pfn + i;
+
+			if (unlikely(!(i % MAX_ORDER_NR_PAGES)))
+				touch_nmi_watchdog();
+
+			if (!pfn_valid(pfn))
+				continue;
+
+			page = pfn_to_page(pfn);
+
+			if (PageHighMem(page))
+				highmem++;
+
+			if (PageReserved(page))
+				reserved++;
+			else if (page_count(page) == 1)
+				nonshared++;
+			else if (page_count(page) > 1)
+				shared += page_count(page) - 1;
+
+			total++;
+		}
+		pgdat_resize_unlock(pgdat, &flags);
+	}
+
+	printk(KERN_INFO "%lu pages RAM\n", total);
+#ifdef CONFIG_HIGHMEM
+	printk(KERN_INFO "%lu pages HighMem\n", highmem);
+#endif
+	printk(KERN_INFO "%lu pages reserved\n", reserved);
+	printk(KERN_INFO "%lu pages shared\n", shared);
+	printk(KERN_INFO "%lu pages non-shared\n", nonshared);
+#ifdef CONFIG_QUICKLIST
+	printk(KERN_INFO "%lu pages in pagetable cache\n",
+		quicklist_total_size());
+#endif
+}

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 03/20] alpha: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
  2008-07-04 16:07 ` [PATCH 01/20] mm: print swapcache page count in show_swap_cache_info() Johannes Weiner
  2008-07-04 16:07 ` [PATCH 02/20] lib: generic show_mem() Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 04/20] avr32: " Johannes Weiner
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Richard Henderson

[-- Attachment #1: alpha-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 2584 bytes --]

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()
	- free swap pages, printed by show_swap_cache_info()
	- 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: Richard Henderson <rth@twiddle.net>
---
 arch/alpha/mm/init.c |   30 ------------------------------
 arch/alpha/mm/numa.c |   35 -----------------------------------
 2 files changed, 65 deletions(-)

--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -94,36 +94,6 @@ __bad_page(void)
 	return pte_mkdirty(mk_pte(virt_to_page(EMPTY_PGE), PAGE_SHARED));
 }
 
-#ifndef CONFIG_DISCONTIGMEM
-void
-show_mem(void)
-{
-	long i,free = 0,total = 0,reserved = 0;
-	long shared = 0, cached = 0;
-
-	printk("\nMem-info:\n");
-	show_free_areas();
-	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
-	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("%ld pages of RAM\n",total);
-	printk("%ld free pages\n",free);
-	printk("%ld reserved pages\n",reserved);
-	printk("%ld pages shared\n",shared);
-	printk("%ld pages swap cached\n",cached);
-}
-#endif
-
 static inline unsigned long
 load_PCB(struct pcb_struct *pcb)
 {
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -359,38 +359,3 @@ void __init mem_init(void)
 	mem_stress();
 #endif
 }
-
-void
-show_mem(void)
-{
-	long i,free = 0,total = 0,reserved = 0;
-	long shared = 0, cached = 0;
-	int nid;
-
-	printk("\nMem-info:\n");
-	show_free_areas();
-	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
-	for_each_online_node(nid) {
-		unsigned long flags;
-		pgdat_resize_lock(NODE_DATA(nid), &flags);
-		i = node_spanned_pages(nid);
-		while (i-- > 0) {
-			struct page *page = nid_page_nr(nid, i);
-			total++;
-			if (PageReserved(page))
-				reserved++;
-			else if (PageSwapCache(page))
-				cached++;
-			else if (!page_count(page))
-				free++;
-			else
-				shared += page_count(page) - 1;
-		}
-		pgdat_resize_unlock(NODE_DATA(nid), &flags);
-	}
-	printk("%ld pages of RAM\n",total);
-	printk("%ld free pages\n",free);
-	printk("%ld reserved pages\n",reserved);
-	printk("%ld pages shared\n",shared);
-	printk("%ld pages swap cached\n",cached);
-}

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 04/20] avr32: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (2 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 03/20] alpha: use " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 05/20] blackfin: " Johannes Weiner
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Haavard Skinnemoen

[-- Attachment #1: avr32-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1636 bytes --]

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 slabs, 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>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
---
 arch/avr32/mm/init.c |   39 ---------------------------------------
 1 file changed, 39 deletions(-)

--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -36,45 +36,6 @@ EXPORT_SYMBOL(empty_zero_page);
  */
 unsigned long mmu_context_cache = NO_CONTEXT;
 
-void show_mem(void)
-{
-	int total = 0, reserved = 0, cached = 0;
-	int slab = 0, free = 0, shared = 0;
-	pg_data_t *pgdat;
-
-	printk("Mem-info:\n");
-	show_free_areas();
-
-	for_each_online_pgdat(pgdat) {
-		struct page *page, *end;
-
-		page = pgdat->node_mem_map;
-		end = page + pgdat->node_spanned_pages;
-
-		do {
-			total++;
-			if (PageReserved(page))
-				reserved++;
-			else if (PageSwapCache(page))
-				cached++;
-			else if (PageSlab(page))
-				slab++;
-			else if (!page_count(page))
-				free++;
-			else
-				shared += page_count(page) - 1;
-			page++;
-		} while (page < end);
-	}
-
-	printk ("%d pages of RAM\n", total);
-	printk ("%d free pages\n", free);
-	printk ("%d reserved pages\n", reserved);
-	printk ("%d slab pages\n", slab);
-	printk ("%d pages shared\n", shared);
-	printk ("%d pages swap cached\n", cached);
-}
-
 /*
  * paging_init() sets up the page tables
  *

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 05/20] blackfin: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (3 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 04/20] avr32: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 06/20] xtensa: " Johannes Weiner
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Bryan Wu

[-- Attachment #1: blackfin-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1461 bytes --]

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>
Acked-by: Bryan Wu <cooloney@kernel.org>
---
 arch/blackfin/mm/init.c |   27 ---------------------------
 1 file changed, 27 deletions(-)

--- a/arch/blackfin/mm/init.c
+++ b/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.

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 06/20] xtensa: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (4 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 05/20] blackfin: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 07/20] x86: " Johannes Weiner
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Chris Zankel

[-- Attachment #1: xtensa-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1367 bytes --]

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: Chris Zankel <chris@zankel.net>
---
 arch/xtensa/mm/init.c |   26 --------------------------
 1 file changed, 26 deletions(-)

--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -272,32 +272,6 @@ void free_initmem(void)
 	       (&__init_end - &__init_begin) >> 10);
 }
 
-void show_mem(void)
-{
-	int i, free = 0, total = 0, reserved = 0;
-	int shared = 0, cached = 0;
-
-	printk("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("%d pages of RAM\n", total);
-	printk("%d reserved pages\n", reserved);
-	printk("%d pages shared\n", shared);
-	printk("%d pages swap cached\n",cached);
-	printk("%d free pages\n", free);
-}
-
 struct kmem_cache *pgtable_cache __read_mostly;
 
 static void pgd_ctor(struct kmem_cache *cache, void* addr)

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/20] x86: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (5 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 06/20] xtensa: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 08/20] um: " Johannes Weiner
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Ingo Molnar

[-- Attachment #1: x86-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 3572 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()
	- dirty pages, writeback pages, mapped pages, slab pages,
	  pagetable pages, printed by show_free_areas()

where show_mem() calls show_free_areas(), which calls
show_swap_cache_info().

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/mm/init_64.c    |   37 -------------------------------------
 arch/x86/mm/pgtable_32.c |   47 -----------------------------------------------
 2 files changed, 84 deletions(-)

--- a/arch/x86/mm/pgtable_32.c
+++ b/arch/x86/mm/pgtable_32.c
@@ -20,53 +20,6 @@
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
 
-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;
-	unsigned long flags;
-
-	printk(KERN_INFO "Mem-info:\n");
-	show_free_areas();
-	for_each_online_pgdat(pgdat) {
-		pgdat_resize_lock(pgdat, &flags);
-		for (i = 0; i < pgdat->node_spanned_pages; ++i) {
-			if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
-				touch_nmi_watchdog();
-			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(KERN_INFO "%d pages of RAM\n", total);
-	printk(KERN_INFO "%d pages of HIGHMEM\n", highmem);
-	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);
-
-	printk(KERN_INFO "%lu pages dirty\n", global_page_state(NR_FILE_DIRTY));
-	printk(KERN_INFO "%lu pages writeback\n",
-					global_page_state(NR_WRITEBACK));
-	printk(KERN_INFO "%lu pages mapped\n", global_page_state(NR_FILE_MAPPED));
-	printk(KERN_INFO "%lu pages slab\n",
-		global_page_state(NR_SLAB_RECLAIMABLE) +
-		global_page_state(NR_SLAB_UNRECLAIMABLE));
-	printk(KERN_INFO "%lu pages pagetables\n",
-					global_page_state(NR_PAGETABLE));
-}
-
 /*
  * Associate a virtual page frame with a given physical page frame 
  * and protection flags for that frame.
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -85,43 +85,6 @@ early_param("gbpages", parse_direct_gbpa
  * around without checking the pgd every time.
  */
 
-void show_mem(void)
-{
-	long i, total = 0, reserved = 0;
-	long shared = 0, cached = 0;
-	struct page *page;
-	pg_data_t *pgdat;
-
-	printk(KERN_INFO "Mem-info:\n");
-	show_free_areas();
-	for_each_online_pgdat(pgdat) {
-		for (i = 0; i < pgdat->node_spanned_pages; ++i) {
-			/*
-			 * This loop can take a while with 256 GB and
-			 * 4k pages so defer the NMI watchdog:
-			 */
-			if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
-				touch_nmi_watchdog();
-
-			if (!pfn_valid(pgdat->node_start_pfn + i))
-				continue;
-
-			page = pfn_to_page(pgdat->node_start_pfn + i);
-			total++;
-			if (PageReserved(page))
-				reserved++;
-			else if (PageSwapCache(page))
-				cached++;
-			else if (page_count(page))
-				shared += page_count(page) - 1;
-		}
-	}
-	printk(KERN_INFO "%lu pages of RAM\n",		total);
-	printk(KERN_INFO "%lu reserved pages\n",	reserved);
-	printk(KERN_INFO "%lu pages shared\n",		shared);
-	printk(KERN_INFO "%lu pages swap cached\n",	cached);
-}
-
 int after_bootmem;
 
 static __init void *spp_getpage(void)

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 08/20] um: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (6 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 07/20] x86: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 09/20] sparc64: " Johannes Weiner
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Jeff Dike

[-- Attachment #1: um-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1553 bytes --]

Remove arch-specific show_mem() in favor of the generic version.

This also removes the following redundant information display:

	- free swap pages, printed by show_swap_cache_info()
	- 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>
Acked-by: Jeff Dike <jdike@addtoit.com>
---
 arch/um/kernel/mem.c |   31 -------------------------------
 1 file changed, 31 deletions(-)

--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -264,37 +264,6 @@ void free_initrd_mem(unsigned long start
 }
 #endif
 
-void show_mem(void)
-{
-	int pfn, total = 0, reserved = 0;
-	int shared = 0, cached = 0;
-	int high_mem = 0;
-	struct page *page;
-
-	printk(KERN_INFO "Mem-info:\n");
-	show_free_areas();
-	printk(KERN_INFO "Free swap:       %6ldkB\n",
-	       nr_swap_pages<<(PAGE_SHIFT-10));
-	pfn = max_mapnr;
-	while (pfn-- > 0) {
-		page = pfn_to_page(pfn);
-		total++;
-		if (PageHighMem(page))
-			high_mem++;
-		if (PageReserved(page))
-			reserved++;
-		else if (PageSwapCache(page))
-			cached++;
-		else if (page_count(page))
-			shared += page_count(page) - 1;
-	}
-	printk(KERN_INFO "%d pages of RAM\n", total);
-	printk(KERN_INFO "%d pages of HIGHMEM\n", high_mem);
-	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);
-}
-
 /* Allocate and free page tables. */
 
 pgd_t *pgd_alloc(struct mm_struct *mm)

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 09/20] sparc64: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (7 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 08/20] um: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 10/20] sh: " Johannes Weiner
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, David S. Miller

[-- Attachment #1: sparc64-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 2235 bytes --]

Remove arch-specific show_mem() in favor of the generic version.

This also removes the following redundant information display:

	- free swap pages, printed by show_swap_cache_info()
	- pages in swapcache, printed by show_swap_cache_info()
	- dirty pages, writeback pages, mapped pages, slab pages,
	  pagetables pages, printed by show_free_areas()

where show_mem() calls show_free_areas(), which calls
show_swap_cache_info().

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Acked-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc64/mm/init.c |   45 ---------------------------------------------
 1 file changed, 45 deletions(-)

--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -392,51 +392,6 @@ void __kprobes flush_icache_range(unsign
 	}
 }
 
-void show_mem(void)
-{
-	unsigned long total = 0, reserved = 0;
-	unsigned long shared = 0, cached = 0;
-	pg_data_t *pgdat;
-
-	printk(KERN_INFO "Mem-info:\n");
-	show_free_areas();
-	printk(KERN_INFO "Free swap:       %6ldkB\n",
-	       nr_swap_pages << (PAGE_SHIFT-10));
-	for_each_online_pgdat(pgdat) {
-		unsigned long i, flags;
-
-		pgdat_resize_lock(pgdat, &flags);
-		for (i = 0; i < pgdat->node_spanned_pages; i++) {
-			struct page *page = pgdat_page_nr(pgdat, i);
-			total++;
-			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(KERN_INFO "%lu pages of RAM\n", total);
-	printk(KERN_INFO "%lu reserved pages\n", reserved);
-	printk(KERN_INFO "%lu pages shared\n", shared);
-	printk(KERN_INFO "%lu pages swap cached\n", cached);
-
-	printk(KERN_INFO "%lu pages dirty\n",
-	       global_page_state(NR_FILE_DIRTY));
-	printk(KERN_INFO "%lu pages writeback\n",
-	       global_page_state(NR_WRITEBACK));
-	printk(KERN_INFO "%lu pages mapped\n",
-	       global_page_state(NR_FILE_MAPPED));
-	printk(KERN_INFO "%lu pages slab\n",
-		global_page_state(NR_SLAB_RECLAIMABLE) +
-		global_page_state(NR_SLAB_UNRECLAIMABLE));
-	printk(KERN_INFO "%lu pages pagetables\n",
-	       global_page_state(NR_PAGETABLE));
-}
-
 void mmu_info(struct seq_file *m)
 {
 	if (tlb_type == cheetah)

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 10/20] sh: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (8 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 09/20] sparc64: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 11/20] s390: " Johannes Weiner
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Paul Mundt

[-- Attachment #1: sh-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1981 bytes --]

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 slab, printed by show_free_areas()
	- free swap pages, printed by show_swap_cache_info()
	- 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>
Acked-by: Paul Mundt <lethal@linux-sh.org>
---
 arch/sh/mm/init.c |   41 -----------------------------------------
 1 file changed, 41 deletions(-)

--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -25,47 +25,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_ga
 pgd_t swapper_pg_dir[PTRS_PER_PGD];
 unsigned long cached_to_uncached = 0;
 
-void show_mem(void)
-{
-	int total = 0, reserved = 0, free = 0;
-	int shared = 0, cached = 0, slab = 0;
-	pg_data_t *pgdat;
-
-	printk("Mem-info:\n");
-	show_free_areas();
-
-	for_each_online_pgdat(pgdat) {
-		unsigned long flags, i;
-
-		pgdat_resize_lock(pgdat, &flags);
-		for (i = 0; i < pgdat->node_spanned_pages; i++) {
-			struct page *page = pgdat_page_nr(pgdat, i);
-			total++;
-			if (PageReserved(page))
-				reserved++;
-			else if (PageSwapCache(page))
-				cached++;
-			else if (PageSlab(page))
-				slab++;
-			else if (!page_count(page))
-				free++;
-			else
-				shared += page_count(page) - 1;
-		}
-		pgdat_resize_unlock(pgdat, &flags);
-	}
-
-	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
-	printk("%d pages of RAM\n", total);
-	printk("%d free pages\n", free);
-	printk("%d reserved pages\n", reserved);
-	printk("%d slab pages\n", slab);
-	printk("%d pages shared\n", shared);
-	printk("%d pages swap cached\n", cached);
-	printk(KERN_INFO "Total of %ld pages in page table cache\n",
-	       quicklist_total_size());
-}
-
 #ifdef CONFIG_MMU
 static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
 {

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 11/20] s390: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (9 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 10/20] sh: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 12/20] powerpc: " Johannes Weiner
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Heiko Carstens

[-- Attachment #1: s390-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1646 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>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/s390/mm/init.c |   32 --------------------------------
 1 file changed, 32 deletions(-)

--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -42,38 +42,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_ga
 pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
 char  empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
 
-void show_mem(void)
-{
-	unsigned long i, total = 0, reserved = 0;
-	unsigned long shared = 0, cached = 0;
-	unsigned long flags;
-	struct page *page;
-	pg_data_t *pgdat;
-
-	printk("Mem-info:\n");
-	show_free_areas();
-	for_each_online_pgdat(pgdat) {
-		pgdat_resize_lock(pgdat, &flags);
-		for (i = 0; i < pgdat->node_spanned_pages; i++) {
-			if (!pfn_valid(pgdat->node_start_pfn + i))
-				continue;
-			page = pfn_to_page(pgdat->node_start_pfn + i);
-			total++;
-			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("%ld pages of RAM\n", total);
-	printk("%ld reserved pages\n", reserved);
-	printk("%ld pages shared\n", shared);
-	printk("%ld pages swap cached\n", cached);
-}
-
 /*
  * paging_init() sets up the page tables
  */

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 12/20] powerpc: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (10 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 11/20] s390: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 13/20] mn10300: " Johannes Weiner
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, linux-arch, Benjamin Herrenschmidt, Paul Mackerras

[-- Attachment #1: powerpc-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1822 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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Paul Mackerras <paulus@samba.org>
---
 arch/powerpc/mm/mem.c |   39 ---------------------------------------
 1 file changed, 39 deletions(-)

--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -185,45 +185,6 @@ walk_memory_resource(unsigned long start
 }
 EXPORT_SYMBOL_GPL(walk_memory_resource);
 
-void show_mem(void)
-{
-	unsigned long total = 0, reserved = 0;
-	unsigned long shared = 0, cached = 0;
-	unsigned long 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++) {
-			if (!pfn_valid(pgdat->node_start_pfn + i))
-				continue;
-			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("%ld pages of RAM\n", total);
-#ifdef CONFIG_HIGHMEM
-	printk("%ld pages of HIGHMEM\n", highmem);
-#endif
-	printk("%ld reserved pages\n", reserved);
-	printk("%ld pages shared\n", shared);
-	printk("%ld pages swap cached\n", cached);
-}
-
 /*
  * Initialize the bootmem system and give it all the memory we
  * have available.  If we are using highmem, we only put the

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 13/20] mn10300: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (11 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 12/20] powerpc: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 14/20] h8300: " Johannes Weiner
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, David Howells

[-- Attachment #1: mn10300-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1485 bytes --]

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>
Acked-by: David Howells <dhowells@redhat.com>
---
 arch/mn10300/mm/pgtable.c |   27 ---------------------------
 1 file changed, 27 deletions(-)

--- a/arch/mn10300/mm/pgtable.c
+++ b/arch/mn10300/mm/pgtable.c
@@ -27,33 +27,6 @@
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
 
-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);
-}
-
 /*
  * Associate a large virtual page frame with a given physical page frame
  * and protection flags for that frame. pfn is for the base of the page,

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 14/20] h8300: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (12 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 13/20] mn10300: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 15/20] mips: " Johannes Weiner
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch

[-- Attachment #1: h8300-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1333 bytes --]

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>
---
 arch/h8300/mm/init.c |   27 ---------------------------
 1 file changed, 27 deletions(-)

--- a/arch/h8300/mm/init.c
+++ b/arch/h8300/mm/init.c
@@ -64,33 +64,6 @@ unsigned long empty_zero_page;
 
 extern unsigned long rom_length;
 
-void show_mem(void)
-{
-    unsigned long i;
-    int free = 0, total = 0, reserved = 0, shared = 0;
-    int cached = 0;
-
-    printk("\nMem-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("%d pages of RAM\n",total);
-    printk("%d free pages\n",free);
-    printk("%d reserved pages\n",reserved);
-    printk("%d pages shared\n",shared);
-    printk("%d pages swap cached\n",cached);
-}
-
 extern unsigned long memory_start;
 extern unsigned long memory_end;
 

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 15/20] mips: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (13 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 14/20] h8300: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 16/20] m68knommu: " Johannes Weiner
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Ralf Baechle

[-- Attachment #1: mips-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1877 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>
---
 arch/mips/mm/Makefile  |    3 +--
 arch/mips/mm/pgtable.c |   36 ------------------------------------
 2 files changed, 1 insertion(+), 38 deletions(-)

--- a/arch/mips/mm/Makefile
+++ b/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 page.o
+				   init.o tlbex.o tlbex-fault.o uasm.o page.o
 
 obj-$(CONFIG_32BIT)		+= ioremap.o pgtable-32.o
 obj-$(CONFIG_64BIT)		+= pgtable-64.o
--- a/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
-}

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 16/20] m68knommu: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (14 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 15/20] mips: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-05  8:11   ` Geert Uytterhoeven
  2008-07-06  3:34   ` Greg Ungerer
  2008-07-04 16:07 ` [PATCH 17/20] m68k: " Johannes Weiner
                   ` (4 subsequent siblings)
  20 siblings, 2 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Geert Uytterhoeven

[-- Attachment #1: m68knommu-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1455 bytes --]

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: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68knommu/mm/init.c |   27 ---------------------------
 1 file changed, 27 deletions(-)

--- a/arch/m68knommu/mm/init.c
+++ b/arch/m68knommu/mm/init.c
@@ -62,33 +62,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 "\nMem-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);
-}
-
 extern unsigned long memory_start;
 extern unsigned long memory_end;
 

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 17/20] m68k: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (15 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 16/20] m68knommu: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 18/20] m32r: " Johannes Weiner
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Geert Uytterhoeven

[-- Attachment #1: m68k-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1498 bytes --]

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>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68k/mm/init.c |   30 ------------------------------
 1 file changed, 30 deletions(-)

--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -69,36 +69,6 @@ void __init m68k_setup_node(int node)
 void *empty_zero_page;
 EXPORT_SYMBOL(empty_zero_page);
 
-void show_mem(void)
-{
-	pg_data_t *pgdat;
-	int free = 0, total = 0, reserved = 0, shared = 0;
-	int cached = 0;
-	int i;
-
-	printk("\nMem-info:\n");
-	show_free_areas();
-	for_each_online_pgdat(pgdat) {
-		for (i = 0; i < pgdat->node_spanned_pages; i++) {
-			struct page *page = pgdat->node_mem_map + i;
-			total++;
-			if (PageReserved(page))
-				reserved++;
-			else if (PageSwapCache(page))
-				cached++;
-			else if (!page_count(page))
-				free++;
-			else
-				shared += page_count(page) - 1;
-		}
-	}
-	printk("%d pages of RAM\n",total);
-	printk("%d free pages\n",free);
-	printk("%d reserved pages\n",reserved);
-	printk("%d pages shared\n",shared);
-	printk("%d pages swap cached\n",cached);
-}
-
 extern void init_pointer_table(unsigned long ptable);
 
 /* References to section boundaries */

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 18/20] m32r: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (16 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 17/20] m68k: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 19/20] frv: " Johannes Weiner
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Hirokazu Takata

[-- Attachment #1: m32r-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1663 bytes --]

Remove arch-specific show_mem() in favor of the generic version.

This also removes the following redundant information display:

	- free swap pages, printed by show_swap_cache_info()
	- 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>
---
 arch/m32r/mm/init.c |   36 ------------------------------------
 1 file changed, 36 deletions(-)

--- a/arch/m32r/mm/init.c
+++ b/arch/m32r/mm/init.c
@@ -36,42 +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();
-	printk("Free swap:       %6ldkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
-	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.
  */

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 19/20] frv: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (17 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 18/20] m32r: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07 ` [PATCH 20/20] cris: " Johannes Weiner
  2008-07-15 19:06 ` [PATCH 00/20] generic show_mem() v5 Dave Hansen
  20 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, David Howells

[-- Attachment #1: frv-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1436 bytes --]

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()

where show_mem() calls show_free_areas().

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Acked-by: David Howells <dhowells@redhat.com>
---
 arch/frv/mm/init.c |   31 -------------------------------
 1 file changed, 31 deletions(-)

--- a/arch/frv/mm/init.c
+++ b/arch/frv/mm/init.c
@@ -63,37 +63,6 @@ EXPORT_SYMBOL(empty_zero_page);
 
 /*****************************************************************************/
 /*
- *
- */
-void show_mem(void)
-{
-	unsigned long i;
-	int free = 0, total = 0, reserved = 0, shared = 0;
-
-	printk("\nMem-info:\n");
-	show_free_areas();
-	i = max_mapnr;
-	while (i-- > 0) {
-		struct page *page = &mem_map[i];
-
-		total++;
-		if (PageReserved(page))
-			reserved++;
-		else if (!page_count(page))
-			free++;
-		else
-			shared += page_count(page) - 1;
-	}
-
-	printk("%d pages of RAM\n",total);
-	printk("%d free pages\n",free);
-	printk("%d reserved pages\n",reserved);
-	printk("%d pages shared\n",shared);
-
-} /* end show_mem() */
-
-/*****************************************************************************/
-/*
  * paging_init() continues the virtual memory environment setup which
  * was begun by the code in arch/head.S.
  * The parameters are pointers to where to stick the starting and ending

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 20/20] cris: use generic show_mem()
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (18 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 19/20] frv: " Johannes Weiner
@ 2008-07-04 16:07 ` Johannes Weiner
  2008-07-04 16:07   ` Johannes Weiner
  2008-07-15 19:06 ` [PATCH 00/20] generic show_mem() v5 Dave Hansen
  20 siblings, 1 reply; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Mikael Starvik

[-- Attachment #1: cris-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1458 bytes --]

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>
Acked-by: Mikael Starvik <starvik@axis.com>
---
 arch/cris/mm/init.c |   30 ------------------------------
 1 file changed, 30 deletions(-)

--- a/arch/cris/mm/init.c
+++ b/arch/cris/mm/init.c
@@ -19,36 +19,6 @@ unsigned long empty_zero_page;
 extern char _stext, _edata, _etext; /* From linkerscript */
 extern char __init_begin, __init_end;
 
-void 
-show_mem(void)
-{
-	int i,free = 0,total = 0,cached = 0, reserved = 0, nonshared = 0;
-	int shared = 0;
-
-	printk("\nMem-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 if (page_count(mem_map+i) == 1)
-			nonshared++;
-		else
-			shared += page_count(mem_map+i) - 1;
-	}
-	printk("%d pages of RAM\n",total);
-	printk("%d free pages\n",free);
-	printk("%d reserved pages\n",reserved);
-	printk("%d pages nonshared\n",nonshared);
-	printk("%d pages shared\n",shared);
-	printk("%d pages swap cached\n",cached);
-}
-
 void __init
 mem_init(void)
 {

-- 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 20/20] cris: use generic show_mem()
  2008-07-04 16:07 ` [PATCH 20/20] cris: " Johannes Weiner
@ 2008-07-04 16:07   ` Johannes Weiner
  0 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-04 16:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arch, Mikael Starvik

[-- Attachment #1: cris-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1459 bytes --]

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>
Acked-by: Mikael Starvik <starvik@axis.com>
---
 arch/cris/mm/init.c |   30 ------------------------------
 1 file changed, 30 deletions(-)

--- a/arch/cris/mm/init.c
+++ b/arch/cris/mm/init.c
@@ -19,36 +19,6 @@ unsigned long empty_zero_page;
 extern char _stext, _edata, _etext; /* From linkerscript */
 extern char __init_begin, __init_end;
 
-void 
-show_mem(void)
-{
-	int i,free = 0,total = 0,cached = 0, reserved = 0, nonshared = 0;
-	int shared = 0;
-
-	printk("\nMem-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 if (page_count(mem_map+i) == 1)
-			nonshared++;
-		else
-			shared += page_count(mem_map+i) - 1;
-	}
-	printk("%d pages of RAM\n",total);
-	printk("%d free pages\n",free);
-	printk("%d reserved pages\n",reserved);
-	printk("%d pages nonshared\n",nonshared);
-	printk("%d pages shared\n",shared);
-	printk("%d pages swap cached\n",cached);
-}
-
 void __init
 mem_init(void)
 {

-- 


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 16/20] m68knommu: use generic show_mem()
  2008-07-04 16:07 ` [PATCH 16/20] m68knommu: " Johannes Weiner
@ 2008-07-05  8:11   ` Geert Uytterhoeven
  2008-07-05 11:30     ` Johannes Weiner
  2008-07-06  3:34   ` Greg Ungerer
  1 sibling, 1 reply; 37+ messages in thread
From: Geert Uytterhoeven @ 2008-07-05  8:11 UTC (permalink / raw)
  To: Johannes Weiner, Greg Ungerer
  Cc: Andrew Morton, Linux Kernel Development, linux-arch, uClinux list

On Fri, 4 Jul 2008, Johannes Weiner 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: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  arch/m68knommu/mm/init.c |   27 ---------------------------

m68knommu is uClinux.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 02/20] lib: generic show_mem()
  2008-07-04 16:07 ` [PATCH 02/20] lib: generic show_mem() Johannes Weiner
@ 2008-07-05  8:34   ` Heiko Carstens
  2008-07-05 11:29     ` Johannes Weiner
  0 siblings, 1 reply; 37+ messages in thread
From: Heiko Carstens @ 2008-07-05  8:34 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Andrew Morton, linux-kernel, linux-arch

On Fri, Jul 04, 2008 at 06:07:39PM +0200, Johannes Weiner wrote:
> This implements a platform-independent version of show_mem().
> 
> Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
> ---
>  lib/Makefile   |    2 -
>  lib/show_mem.c |   63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 64 insertions(+), 1 deletion(-)
> 
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -6,7 +6,7 @@ lib-y := ctype.o string.o vsprintf.o cmd
>  	 rbtree.o radix-tree.o dump_stack.o \
>  	 idr.o int_sqrt.o extable.o prio_tree.o \
>  	 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
> -	 proportions.o prio_heap.o ratelimit.o
> +	 proportions.o prio_heap.o ratelimit.o show_mem.o
> 
>  ifdef CONFIG_FTRACE
>  # Do not profile string.o, since it may be used in early boot or vdso
> --- /dev/null
> +++ b/lib/show_mem.c
> @@ -0,0 +1,63 @@
> +/*
> + * Generic show_mem() implementation
> + *
> + * Copyright (C) 2008 Johannes Weiner <hannes@saeurebad.de>
> + * All code subject to the GPL version 2.
> + */
> +
> +#include <linux/mm.h>
> +#include <linux/nmi.h>
> +#include <linux/quicklist.h>
> +
> +void show_mem(void)
> +{

Umh.. I think your 4th patch set was the way to go. This set is not
bisectable anymore and those architectures which you didn't convert
to the generic implementation won't build anymore. show_mem is present
twice there...

You might solve this by adding an __attribute__((weak)) but I'm sure
people will complain again, because it produces dead code for all
architectures which got converted.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 02/20] lib: generic show_mem()
  2008-07-05  8:34   ` Heiko Carstens
@ 2008-07-05 11:29     ` Johannes Weiner
  2008-07-05 11:54       ` Heiko Carstens
  0 siblings, 1 reply; 37+ messages in thread
From: Johannes Weiner @ 2008-07-05 11:29 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: Andrew Morton, linux-kernel, linux-arch

Hi,

Heiko Carstens <heiko.carstens@de.ibm.com> writes:

> On Fri, Jul 04, 2008 at 06:07:39PM +0200, Johannes Weiner wrote:
>> This implements a platform-independent version of show_mem().
>> 
>> Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
>> ---
>>  lib/Makefile   |    2 -
>>  lib/show_mem.c |   63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 64 insertions(+), 1 deletion(-)
>> 
>> --- a/lib/Makefile
>> +++ b/lib/Makefile
>> @@ -6,7 +6,7 @@ lib-y := ctype.o string.o vsprintf.o cmd
>>  	 rbtree.o radix-tree.o dump_stack.o \
>>  	 idr.o int_sqrt.o extable.o prio_tree.o \
>>  	 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
>> -	 proportions.o prio_heap.o ratelimit.o
>> +	 proportions.o prio_heap.o ratelimit.o show_mem.o
>> 
>>  ifdef CONFIG_FTRACE
>>  # Do not profile string.o, since it may be used in early boot or vdso
>> --- /dev/null
>> +++ b/lib/show_mem.c
>> @@ -0,0 +1,63 @@
>> +/*
>> + * Generic show_mem() implementation
>> + *
>> + * Copyright (C) 2008 Johannes Weiner <hannes@saeurebad.de>
>> + * All code subject to the GPL version 2.
>> + */
>> +
>> +#include <linux/mm.h>
>> +#include <linux/nmi.h>
>> +#include <linux/quicklist.h>
>> +
>> +void show_mem(void)
>> +{
>
> Umh.. I think your 4th patch set was the way to go. This set is not
> bisectable anymore and those architectures which you didn't convert
> to the generic implementation won't build anymore. show_mem is present
> twice there...

hannes@skyscraper:/tmp/test$ gcc -o prog prog.c lib1.a lib2.a && ./prog
lib1
hannes@skyscraper:/tmp/test$ gcc -o prog prog.c lib2.a lib1.a && ./prog
lib2

Both lib1 and lib2 define foo() which prog calls.

I tested this with x86 and it built before and after removal of the
x86-specific show_mem() (and it did the right thing as the arch code has
higher priority than lib code).

But why is it no more bisectable?  You have one point where your kernel
uses the arch-specific show_mem() and in the next commit, you use the
generic version.  If something breaks, you can compare the old arch
version with the generic version.

> You might solve this by adding an __attribute__((weak)) but I'm sure
> people will complain again, because it produces dead code for all
> architectures which got converted.

Yeah, lib/show_mem.c is built in any case, which sucks a bit.

What do others think?  Would you prefer conditional code generation
about linking magic here?

	Hannes

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 16/20] m68knommu: use generic show_mem()
  2008-07-05  8:11   ` Geert Uytterhoeven
@ 2008-07-05 11:30     ` Johannes Weiner
  2008-07-05 12:10       ` Johannes Weiner
  0 siblings, 1 reply; 37+ messages in thread
From: Johannes Weiner @ 2008-07-05 11:30 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Greg Ungerer, Andrew Morton, Linux Kernel Development, linux-arch,
	uClinux list

Hi,

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> On Fri, 4 Jul 2008, Johannes Weiner 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: Geert Uytterhoeven <geert@linux-m68k.org>
>> ---
>>  arch/m68knommu/mm/init.c |   27 ---------------------------
>
> m68knommu is uClinux.

Uhm, I can not quite follow you here.  Is the CC wrong?

	Hannes

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 02/20] lib: generic show_mem()
  2008-07-05 11:29     ` Johannes Weiner
@ 2008-07-05 11:54       ` Heiko Carstens
  0 siblings, 0 replies; 37+ messages in thread
From: Heiko Carstens @ 2008-07-05 11:54 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Andrew Morton, linux-kernel, linux-arch

> > Umh.. I think your 4th patch set was the way to go. This set is not
> > bisectable anymore and those architectures which you didn't convert
> > to the generic implementation won't build anymore. show_mem is present
> > twice there...
> 
> hannes@skyscraper:/tmp/test$ gcc -o prog prog.c lib1.a lib2.a && ./prog
> lib1
> hannes@skyscraper:/tmp/test$ gcc -o prog prog.c lib2.a lib1.a && ./prog
> lib2
> 
> Both lib1 and lib2 define foo() which prog calls.
> 
> I tested this with x86 and it built before and after removal of the
> x86-specific show_mem() (and it did the right thing as the arch code has
> higher priority than lib code).
> 
> But why is it no more bisectable?  You have one point where your kernel
> uses the arch-specific show_mem() and in the next commit, you use the
> generic version.  If something breaks, you can compare the old arch
> version with the generic version.

My fault. It works.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 16/20] m68knommu: use generic show_mem()
  2008-07-05 11:30     ` Johannes Weiner
@ 2008-07-05 12:10       ` Johannes Weiner
  0 siblings, 0 replies; 37+ messages in thread
From: Johannes Weiner @ 2008-07-05 12:10 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Greg Ungerer, Andrew Morton, Linux Kernel Development, linux-arch,
	uClinux list

Johannes Weiner <hannes@saeurebad.de> writes:

> Hi,
>
> Geert Uytterhoeven <geert@linux-m68k.org> writes:
>
>> On Fri, 4 Jul 2008, Johannes Weiner 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: Geert Uytterhoeven <geert@linux-m68k.org>
>>> ---
>>>  arch/m68knommu/mm/init.c |   27 ---------------------------
>>
>> m68knommu is uClinux.
>
> Uhm, I can not quite follow you here.  Is the CC wrong?

Nevermind, just noticed that you added the ucl list to cc.

	Hannes

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 16/20] m68knommu: use generic show_mem()
  2008-07-04 16:07 ` [PATCH 16/20] m68knommu: " Johannes Weiner
  2008-07-05  8:11   ` Geert Uytterhoeven
@ 2008-07-06  3:34   ` Greg Ungerer
  2008-07-06  3:34     ` Greg Ungerer
  1 sibling, 1 reply; 37+ messages in thread
From: Greg Ungerer @ 2008-07-06  3:34 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, linux-kernel, linux-arch, Geert Uytterhoeven


Johannes Weiner 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: Geert Uytterhoeven <geert@linux-m68k.org>

Acked-by: Greg Ungerer <gerg@uclinux.org>



> ---
>  arch/m68knommu/mm/init.c |   27 ---------------------------
>  1 file changed, 27 deletions(-)
> 
> --- a/arch/m68knommu/mm/init.c
> +++ b/arch/m68knommu/mm/init.c
> @@ -62,33 +62,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 "\nMem-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);
> -}
> -
>  extern unsigned long memory_start;
>  extern unsigned long memory_end;
>  

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 16/20] m68knommu: use generic show_mem()
  2008-07-06  3:34   ` Greg Ungerer
@ 2008-07-06  3:34     ` Greg Ungerer
  0 siblings, 0 replies; 37+ messages in thread
From: Greg Ungerer @ 2008-07-06  3:34 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, linux-kernel, linux-arch, Geert Uytterhoeven


Johannes Weiner 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: Geert Uytterhoeven <geert@linux-m68k.org>

Acked-by: Greg Ungerer <gerg@uclinux.org>



> ---
>  arch/m68knommu/mm/init.c |   27 ---------------------------
>  1 file changed, 27 deletions(-)
> 
> --- a/arch/m68knommu/mm/init.c
> +++ b/arch/m68knommu/mm/init.c
> @@ -62,33 +62,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 "\nMem-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);
> -}
> -
>  extern unsigned long memory_start;
>  extern unsigned long memory_end;
>  

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/20] generic show_mem() v5
  2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
                   ` (19 preceding siblings ...)
  2008-07-04 16:07 ` [PATCH 20/20] cris: " Johannes Weiner
@ 2008-07-15 19:06 ` Dave Hansen
  2008-07-15 19:06   ` Dave Hansen
  2008-07-15 20:22   ` Andrew Morton
  20 siblings, 2 replies; 37+ messages in thread
From: Dave Hansen @ 2008-07-15 19:06 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Andrew Morton, linux-kernel, linux-arch

What's holding this up?

I'm getting a pretty regular oops that this series would have fixed.  I
have a temporary workaround patch attached, but it would conflict with
this, and I'd hate to muck up its merge.

[127227.081586] IP: [<c011c5bb>] show_mem+0x8b/0x250
[127227.091751] Oops: 0000 [#1] SMP
[127227.095152] Modules linked in: kqemu authenc esp4 aead xfrm4_mode_tunnel nls_iso8859_1 vfat fat rfcomm l2cap kvm_intel kvm tun ppdev acpi_cpufreq cpufreq_stats cpufreq_ondemand freq_table cpufreq_powersave cpufreq_userspace cpufreq_conservative sbs container sbshc iptable_filter ip_tables x_tables deflate zlib_deflate des_generic cbc aes_generic xcbc sha256_generic sha1_generic af_key dummy dm_crypt dm_mod lp joydev snd_hda_intel snd_pcm_oss snd_pcm snd_mixer_oss snd_seq_dummy snd_seq_oss af_packet snd_seq_midi_event snd_seq arc4 ecb usbhid snd_timer pcmcia crypto_blkcipher usb_storage snd_seq_device psmouse thinkpad_acpi iwl4965 iwlcore hid serio_raw libusual hci_usb sdhci mac80211 led_class snd parport_pc parport mmc_core ricoh_mmc yenta_socket rsrc_nonstatic pcmcia_core button sound
 core cfg80211 nvram evdev snd_page_alloc ohci1394 ieee1394 ehci_hcd uhci_hcd usbcore e1000 thermal processor fan fuse
[127227.095152]
[127227.095152] Pid: 0, comm: swapper Not tainted (2.6.26-rc8-00089-ge1441b9 #24)
[127227.095152] EIP: 0060:[<c011c5bb>] EFLAGS: 00010206 CPU: 0
[127227.095152] EIP is at show_mem+0x8b/0x250
[127227.095152] EAX: 01800000 EBX: 000c0000 ECX: 00000018 EDX: 01800000
[127227.095152] ESI: c04b5700 EDI: 0013c000 EBP: c0536e10 ESP: c0536de8
[127227.095152]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[127227.095152] Process swapper (pid: 0, ti=c0536000 task=c04afa40 task.ti=c04e8000)
[127227.095152] Stack: c04574fa 00000000 00088000 0000000b 00060e45 00002f19 000c0001 c04b6b24
[127227.095152]        c04afa40 00004020 c0536e5c c016b067 c045fddc c04afd41 00000002 00004020
[127227.095152]        c04b6b04 00000000 00000032 00000000 00000001 00000000 c04b6b00 00000002
[127227.095152] Call Trace:
[127227.095152]  [<c016b067>] ? __alloc_pages_internal+0x3d7/0x420
[127227.095152]  [<c016b0c2>] ? __alloc_pages+0x12/0x20
[127227.095152]  [<c016b102>] ? __get_free_pages+0x12/0x30
[127227.095152]  [<c018d262>] ? __kmalloc_track_caller+0xd2/0x100
[127227.095152]  [<c031bb44>] ? skb_copy+0x34/0x90
[127227.095152]  [<c031b43b>] ? __alloc_skb+0x4b/0x100
[127227.095152]  [<c031bb44>] ? skb_copy+0x34/0x90
[127227.095152]  [<f8ba234b>] ? __ieee80211_rx_handle_packet+0x13b/0x1f0 [mac80211]
[127227.095152]  [<f8ba2906>] ? __ieee80211_rx+0xb6/0xc0 [mac80211]
[127227.095152]  [<f8b91ad3>] ? ieee80211_tasklet_handler+0x103/0x110 [mac80211]
[127227.095152]  [<c013257b>] ? tasklet_action+0xcb/0xe0
[127227.095152]  [<c0132161>] ? __do_softirq+0x81/0x110
[127227.095152]  [<c0105f1e>] ? do_softirq+0x6e/0xd0
[127227.095152]  [<c0160cd0>] ? handle_fasteoi_irq+0x0/0xd0
[127227.095152]  [<c0132255>] ? irq_exit+0x45/0x50
[127227.095152]  [<c0105da1>] ? do_IRQ+0x91/0xf0
[127227.095152]  [<c010479b>] ? common_interrupt+0x23/0x28
[127227.095152]  [<c014007b>] ? sys_timer_create+0xeb/0x2a0
[127227.095152]  [<f8862079>] ? acpi_processor_idle+0x30f/0x47c [processor]
[127227.095152]  [<f8861d6a>] ? acpi_processor_idle+0x0/0x47c [processor]
[127227.095152]  [<c0102122>] ? cpu_idle+0x92/0xe0
[127227.095152]  [<c038d6de>] ? rest_init+0x4e/0x50
[127227.095152]  =======================
[127227.095152] Code: f7 c3 ff 03 00 00 0f 84 bc 01 00 00 8b 86 34 14 00 00 ff 45 f0 01 d8 89 c2 c1 ea 11 8b 14 d5 00 a3 59 c0 c1 e0 05 83 e2 fc 01 c2 <8b> 0a 89 c8 c1 e8 17 83 e0 03 8d 04 80 c1 e0 08 05 00 57 4b c0
[127227.095152] EIP: [<c011c5bb>] show_mem+0x8b/0x250 SS:ESP 0068:c0536de8
[127227.704832] Kernel panic - not syncing: Fatal exception in interrupt

-- Dave

From 55b1d0caade20e9597e07759d923f6ce1350e522 Mon Sep 17 00:00:00 2001
From: Dave Hansen <dave@sr71.net>
Date: Tue, 15 Jul 2008 10:32:56 -0700
Subject: [PATCH] fix i386 show_mem() oops

I've had the occasional kernel hang with 2.6.26 since I
upgraded my laptop to 4G of RAM.  But, I have a hole at
3-4GB, so I need PAE, and I'm running with SPARSEMEM=y.

I figured it was something to do with PAE, but never
got a clean oops until this morning.  The oops was in
show_mem()'s pgdat_page_nr().  It was passing a pfn of
a page from the memory hole and oopsing.

Dumping my sparsemem section table, you can clearly see
the hole:

00000000  03 10 00 c1 00 02 00 c1  03 10 00 c1 80 02 00 c1  |................|
00000010  03 10 00 c1 00 03 00 c1  03 10 00 c1 80 03 00 c1  |................|
00000020  03 10 00 c1 00 04 00 c1  03 10 00 c1 80 04 00 c1  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  03 10 80 c0 00 05 00 c1  03 10 80 c0 80 05 00 c1  |................|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400

The sections are 512MB, and you can see 6 valid ones
followed by two holes, and then two more valid ones.

Anyway, I believe this patch will fix the oops.
---
 arch/x86/mm/pgtable_32.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
index 369cf06..eb2a480 100644
--- a/arch/x86/mm/pgtable_32.c
+++ b/arch/x86/mm/pgtable_32.c
@@ -37,6 +37,8 @@ void show_mem(void)
 		for (i = 0; i < pgdat->node_spanned_pages; ++i) {
 			if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
 				touch_nmi_watchdog();
+			if (!pfn_valid(pgdat->node_start_pfn + i))
+				continue;
 			page = pgdat_page_nr(pgdat, i);
 			total++;
 			if (PageHighMem(page))
-- 
1.5.4.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/20] generic show_mem() v5
  2008-07-15 19:06 ` [PATCH 00/20] generic show_mem() v5 Dave Hansen
@ 2008-07-15 19:06   ` Dave Hansen
  2008-07-15 20:22   ` Andrew Morton
  1 sibling, 0 replies; 37+ messages in thread
From: Dave Hansen @ 2008-07-15 19:06 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Andrew Morton, linux-kernel, linux-arch

What's holding this up?

I'm getting a pretty regular oops that this series would have fixed.  I
have a temporary workaround patch attached, but it would conflict with
this, and I'd hate to muck up its merge.

[127227.081586] IP: [<c011c5bb>] show_mem+0x8b/0x250
[127227.091751] Oops: 0000 [#1] SMP
[127227.095152] Modules linked in: kqemu authenc esp4 aead xfrm4_mode_tunnel nls_iso8859_1 vfat fat rfcomm l2cap kvm_intel kvm tun ppdev acpi_cpufreq cpufreq_stats cpufreq_ondemand freq_table cpufreq_powersave cpufreq_userspace cpufreq_conservative sbs container sbshc iptable_filter ip_tables x_tables deflate zlib_deflate des_generic cbc aes_generic xcbc sha256_generic sha1_generic af_key dummy dm_crypt dm_mod lp joydev snd_hda_intel snd_pcm_oss snd_pcm snd_mixer_oss snd_seq_dummy snd_seq_oss af_packet snd_seq_midi_event snd_seq arc4 ecb usbhid snd_timer pcmcia crypto_blkcipher usb_storage snd_seq_device psmouse thinkpad_acpi iwl4965 iwlcore hid serio_raw libusual hci_usb sdhci mac80211 led_class snd parport_pc parport mmc_core ricoh_mmc yenta_socket rsrc_nonstatic pcmcia_core button soundcore cfg80211 nvram evdev snd_page_alloc ohci1394 ieee1394 ehci_hcd uhci_hcd usbcore e1000 thermal processor fan fuse
[127227.095152]
[127227.095152] Pid: 0, comm: swapper Not tainted (2.6.26-rc8-00089-ge1441b9 #24)
[127227.095152] EIP: 0060:[<c011c5bb>] EFLAGS: 00010206 CPU: 0
[127227.095152] EIP is at show_mem+0x8b/0x250
[127227.095152] EAX: 01800000 EBX: 000c0000 ECX: 00000018 EDX: 01800000
[127227.095152] ESI: c04b5700 EDI: 0013c000 EBP: c0536e10 ESP: c0536de8
[127227.095152]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[127227.095152] Process swapper (pid: 0, ti=c0536000 task=c04afa40 task.ti=c04e8000)
[127227.095152] Stack: c04574fa 00000000 00088000 0000000b 00060e45 00002f19 000c0001 c04b6b24
[127227.095152]        c04afa40 00004020 c0536e5c c016b067 c045fddc c04afd41 00000002 00004020
[127227.095152]        c04b6b04 00000000 00000032 00000000 00000001 00000000 c04b6b00 00000002
[127227.095152] Call Trace:
[127227.095152]  [<c016b067>] ? __alloc_pages_internal+0x3d7/0x420
[127227.095152]  [<c016b0c2>] ? __alloc_pages+0x12/0x20
[127227.095152]  [<c016b102>] ? __get_free_pages+0x12/0x30
[127227.095152]  [<c018d262>] ? __kmalloc_track_caller+0xd2/0x100
[127227.095152]  [<c031bb44>] ? skb_copy+0x34/0x90
[127227.095152]  [<c031b43b>] ? __alloc_skb+0x4b/0x100
[127227.095152]  [<c031bb44>] ? skb_copy+0x34/0x90
[127227.095152]  [<f8ba234b>] ? __ieee80211_rx_handle_packet+0x13b/0x1f0 [mac80211]
[127227.095152]  [<f8ba2906>] ? __ieee80211_rx+0xb6/0xc0 [mac80211]
[127227.095152]  [<f8b91ad3>] ? ieee80211_tasklet_handler+0x103/0x110 [mac80211]
[127227.095152]  [<c013257b>] ? tasklet_action+0xcb/0xe0
[127227.095152]  [<c0132161>] ? __do_softirq+0x81/0x110
[127227.095152]  [<c0105f1e>] ? do_softirq+0x6e/0xd0
[127227.095152]  [<c0160cd0>] ? handle_fasteoi_irq+0x0/0xd0
[127227.095152]  [<c0132255>] ? irq_exit+0x45/0x50
[127227.095152]  [<c0105da1>] ? do_IRQ+0x91/0xf0
[127227.095152]  [<c010479b>] ? common_interrupt+0x23/0x28
[127227.095152]  [<c014007b>] ? sys_timer_create+0xeb/0x2a0
[127227.095152]  [<f8862079>] ? acpi_processor_idle+0x30f/0x47c [processor]
[127227.095152]  [<f8861d6a>] ? acpi_processor_idle+0x0/0x47c [processor]
[127227.095152]  [<c0102122>] ? cpu_idle+0x92/0xe0
[127227.095152]  [<c038d6de>] ? rest_init+0x4e/0x50
[127227.095152]  =======================
[127227.095152] Code: f7 c3 ff 03 00 00 0f 84 bc 01 00 00 8b 86 34 14 00 00 ff 45 f0 01 d8 89 c2 c1 ea 11 8b 14 d5 00 a3 59 c0 c1 e0 05 83 e2 fc 01 c2 <8b> 0a 89 c8 c1 e8 17 83 e0 03 8d 04 80 c1 e0 08 05 00 57 4b c0
[127227.095152] EIP: [<c011c5bb>] show_mem+0x8b/0x250 SS:ESP 0068:c0536de8
[127227.704832] Kernel panic - not syncing: Fatal exception in interrupt

-- Dave

From 55b1d0caade20e9597e07759d923f6ce1350e522 Mon Sep 17 00:00:00 2001
From: Dave Hansen <dave@sr71.net>
Date: Tue, 15 Jul 2008 10:32:56 -0700
Subject: [PATCH] fix i386 show_mem() oops

I've had the occasional kernel hang with 2.6.26 since I
upgraded my laptop to 4G of RAM.  But, I have a hole at
3-4GB, so I need PAE, and I'm running with SPARSEMEM=y.

I figured it was something to do with PAE, but never
got a clean oops until this morning.  The oops was in
show_mem()'s pgdat_page_nr().  It was passing a pfn of
a page from the memory hole and oopsing.

Dumping my sparsemem section table, you can clearly see
the hole:

00000000  03 10 00 c1 00 02 00 c1  03 10 00 c1 80 02 00 c1  |................|
00000010  03 10 00 c1 00 03 00 c1  03 10 00 c1 80 03 00 c1  |................|
00000020  03 10 00 c1 00 04 00 c1  03 10 00 c1 80 04 00 c1  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  03 10 80 c0 00 05 00 c1  03 10 80 c0 80 05 00 c1  |................|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400

The sections are 512MB, and you can see 6 valid ones
followed by two holes, and then two more valid ones.

Anyway, I believe this patch will fix the oops.
---
 arch/x86/mm/pgtable_32.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
index 369cf06..eb2a480 100644
--- a/arch/x86/mm/pgtable_32.c
+++ b/arch/x86/mm/pgtable_32.c
@@ -37,6 +37,8 @@ void show_mem(void)
 		for (i = 0; i < pgdat->node_spanned_pages; ++i) {
 			if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
 				touch_nmi_watchdog();
+			if (!pfn_valid(pgdat->node_start_pfn + i))
+				continue;
 			page = pgdat_page_nr(pgdat, i);
 			total++;
 			if (PageHighMem(page))
-- 
1.5.4.3




^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/20] generic show_mem() v5
  2008-07-15 19:06 ` [PATCH 00/20] generic show_mem() v5 Dave Hansen
  2008-07-15 19:06   ` Dave Hansen
@ 2008-07-15 20:22   ` Andrew Morton
  2008-07-15 20:22     ` Andrew Morton
                       ` (2 more replies)
  1 sibling, 3 replies; 37+ messages in thread
From: Andrew Morton @ 2008-07-15 20:22 UTC (permalink / raw)
  To: Dave Hansen
  Cc: hannes, linux-kernel, linux-arch, Ingo Molnar, Thomas Gleixner,
	stable

On Tue, 15 Jul 2008 12:06:34 -0700
Dave Hansen <dave@linux.vnet.ibm.com> wrote:

> What's holding this up?

Stuck in my backlog, sorry.  Not lost.

> I'm getting a pretty regular oops that this series would have fixed.

Well the patches were far too late for 2.6.26 and you've hit a bug in (I
assume 2.6.26) so we need a 2.6.26.1 fix asap and that megapatchbomb
series is not appropriate.

So the best approach is to get the short-form fix tested and merged
first, so we can also fix 2.6.26.x.


>  I
> have a temporary workaround patch attached, but it would conflict with
> this, and I'd hate to muck up its merge.
> 
> [127227.081586] IP: [<c011c5bb>] show_mem+0x8b/0x250
> [127227.091751] Oops: 0000 [#1] SMP
> [127227.095152] Modules linked in: kqemu authenc esp4 aead xfrm4_mode_tunnel nls_iso8859_1 vfat fat rfcomm l2cap kvm_intel kvm tun ppdev acpi_cpufreq cpufreq_stats cpufreq_ondemand freq_table cpufreq_powersave cpufreq_userspace cpufreq_conservative sbs container sbshc iptable_filter ip_tables x_tables deflate zlib_deflate des_generic cbc aes_generic xcbc sha256_generic sha1_generic af_key dummy dm_crypt dm_mod lp joydev snd_hda_intel snd_pcm_oss snd_pcm snd_mixer_oss snd_seq_dummy snd_seq_oss af_packet snd_seq_midi_event snd_seq arc4 ecb usbhid snd_timer pcmcia crypto_blkcipher usb_storage snd_seq_device psmouse thinkpad_acpi iwl4965 iwlcore hid serio_raw libusual hci_usb sdhci mac80211 led_class snd parport_pc parport mmc_core ricoh_mmc yenta_socket rsrc_nonstatic pcmcia_core button sou
 ndcore cfg80211 nvram evdev snd_page_alloc ohci1394 ieee1394 ehci_hcd uhci_hcd usbcore e1000 thermal processor fan fuse
> [127227.095152]
> [127227.095152] Pid: 0, comm: swapper Not tainted (2.6.26-rc8-00089-ge1441b9 #24)
> [127227.095152] EIP: 0060:[<c011c5bb>] EFLAGS: 00010206 CPU: 0
> [127227.095152] EIP is at show_mem+0x8b/0x250
> [127227.095152] EAX: 01800000 EBX: 000c0000 ECX: 00000018 EDX: 01800000
> [127227.095152] ESI: c04b5700 EDI: 0013c000 EBP: c0536e10 ESP: c0536de8
> [127227.095152]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> [127227.095152] Process swapper (pid: 0, ti=c0536000 task=c04afa40 task.ti=c04e8000)
> [127227.095152] Stack: c04574fa 00000000 00088000 0000000b 00060e45 00002f19 000c0001 c04b6b24
> [127227.095152]        c04afa40 00004020 c0536e5c c016b067 c045fddc c04afd41 00000002 00004020
> [127227.095152]        c04b6b04 00000000 00000032 00000000 00000001 00000000 c04b6b00 00000002
> [127227.095152] Call Trace:
> [127227.095152]  [<c016b067>] ? __alloc_pages_internal+0x3d7/0x420
> [127227.095152]  [<c016b0c2>] ? __alloc_pages+0x12/0x20
> [127227.095152]  [<c016b102>] ? __get_free_pages+0x12/0x30
> [127227.095152]  [<c018d262>] ? __kmalloc_track_caller+0xd2/0x100
> [127227.095152]  [<c031bb44>] ? skb_copy+0x34/0x90
> [127227.095152]  [<c031b43b>] ? __alloc_skb+0x4b/0x100
> [127227.095152]  [<c031bb44>] ? skb_copy+0x34/0x90
> [127227.095152]  [<f8ba234b>] ? __ieee80211_rx_handle_packet+0x13b/0x1f0 [mac80211]
> [127227.095152]  [<f8ba2906>] ? __ieee80211_rx+0xb6/0xc0 [mac80211]
> [127227.095152]  [<f8b91ad3>] ? ieee80211_tasklet_handler+0x103/0x110 [mac80211]
> [127227.095152]  [<c013257b>] ? tasklet_action+0xcb/0xe0
> [127227.095152]  [<c0132161>] ? __do_softirq+0x81/0x110
> [127227.095152]  [<c0105f1e>] ? do_softirq+0x6e/0xd0
> [127227.095152]  [<c0160cd0>] ? handle_fasteoi_irq+0x0/0xd0
> [127227.095152]  [<c0132255>] ? irq_exit+0x45/0x50
> [127227.095152]  [<c0105da1>] ? do_IRQ+0x91/0xf0
> [127227.095152]  [<c010479b>] ? common_interrupt+0x23/0x28
> [127227.095152]  [<c014007b>] ? sys_timer_create+0xeb/0x2a0
> [127227.095152]  [<f8862079>] ? acpi_processor_idle+0x30f/0x47c [processor]
> [127227.095152]  [<f8861d6a>] ? acpi_processor_idle+0x0/0x47c [processor]
> [127227.095152]  [<c0102122>] ? cpu_idle+0x92/0xe0
> [127227.095152]  [<c038d6de>] ? rest_init+0x4e/0x50
> [127227.095152]  =======================
> [127227.095152] Code: f7 c3 ff 03 00 00 0f 84 bc 01 00 00 8b 86 34 14 00 00 ff 45 f0 01 d8 89 c2 c1 ea 11 8b 14 d5 00 a3 59 c0 c1 e0 05 83 e2 fc 01 c2 <8b> 0a 89 c8 c1 e8 17 83 e0 03 8d 04 80 c1 e0 08 05 00 57 4b c0
> [127227.095152] EIP: [<c011c5bb>] show_mem+0x8b/0x250 SS:ESP 0068:c0536de8
> [127227.704832] Kernel panic - not syncing: Fatal exception in interrupt
> 
> -- Dave
> 
> >From 55b1d0caade20e9597e07759d923f6ce1350e522 Mon Sep 17 00:00:00 2001
> From: Dave Hansen <dave@sr71.net>
> Date: Tue, 15 Jul 2008 10:32:56 -0700
> Subject: [PATCH] fix i386 show_mem() oops
> 
> I've had the occasional kernel hang with 2.6.26 since I
> upgraded my laptop to 4G of RAM.  But, I have a hole at
> 3-4GB, so I need PAE, and I'm running with SPARSEMEM=y.
> 
> I figured it was something to do with PAE, but never
> got a clean oops until this morning.  The oops was in
> show_mem()'s pgdat_page_nr().  It was passing a pfn of
> a page from the memory hole and oopsing.
> 
> Dumping my sparsemem section table, you can clearly see
> the hole:
> 
> 00000000  03 10 00 c1 00 02 00 c1  03 10 00 c1 80 02 00 c1  |................|
> 00000010  03 10 00 c1 00 03 00 c1  03 10 00 c1 80 03 00 c1  |................|
> 00000020  03 10 00 c1 00 04 00 c1  03 10 00 c1 80 04 00 c1  |................|
> 00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> 00000040  03 10 80 c0 00 05 00 c1  03 10 80 c0 80 05 00 c1  |................|
> 00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> *
> 00000400
> 
> The sections are 512MB, and you can see 6 valid ones
> followed by two holes, and then two more valid ones.
> 
> Anyway, I believe this patch will fix the oops.

This looks like it might be suitable.  Can you please test it?

> ---
>  arch/x86/mm/pgtable_32.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
> index 369cf06..eb2a480 100644
> --- a/arch/x86/mm/pgtable_32.c
> +++ b/arch/x86/mm/pgtable_32.c
> @@ -37,6 +37,8 @@ void show_mem(void)
>  		for (i = 0; i < pgdat->node_spanned_pages; ++i) {
>  			if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
>  				touch_nmi_watchdog();
> +			if (!pfn_valid(pgdat->node_start_pfn + i))
> +				continue;
>  			page = pgdat_page_nr(pgdat, i);
>  			total++;
>  			if (PageHighMem(page))

What change caused this oops to turn up now?

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/20] generic show_mem() v5
  2008-07-15 20:22   ` Andrew Morton
@ 2008-07-15 20:22     ` Andrew Morton
  2008-07-15 20:33     ` Dave Hansen
  2008-07-16 21:51     ` Dave Hansen
  2 siblings, 0 replies; 37+ messages in thread
From: Andrew Morton @ 2008-07-15 20:22 UTC (permalink / raw)
  To: Dave Hansen
  Cc: hannes, linux-kernel, linux-arch, Ingo Molnar, Thomas Gleixner,
	stable

On Tue, 15 Jul 2008 12:06:34 -0700
Dave Hansen <dave@linux.vnet.ibm.com> wrote:

> What's holding this up?

Stuck in my backlog, sorry.  Not lost.

> I'm getting a pretty regular oops that this series would have fixed.

Well the patches were far too late for 2.6.26 and you've hit a bug in (I
assume 2.6.26) so we need a 2.6.26.1 fix asap and that megapatchbomb
series is not appropriate.

So the best approach is to get the short-form fix tested and merged
first, so we can also fix 2.6.26.x.


>  I
> have a temporary workaround patch attached, but it would conflict with
> this, and I'd hate to muck up its merge.
> 
> [127227.081586] IP: [<c011c5bb>] show_mem+0x8b/0x250
> [127227.091751] Oops: 0000 [#1] SMP
> [127227.095152] Modules linked in: kqemu authenc esp4 aead xfrm4_mode_tunnel nls_iso8859_1 vfat fat rfcomm l2cap kvm_intel kvm tun ppdev acpi_cpufreq cpufreq_stats cpufreq_ondemand freq_table cpufreq_powersave cpufreq_userspace cpufreq_conservative sbs container sbshc iptable_filter ip_tables x_tables deflate zlib_deflate des_generic cbc aes_generic xcbc sha256_generic sha1_generic af_key dummy dm_crypt dm_mod lp joydev snd_hda_intel snd_pcm_oss snd_pcm snd_mixer_oss snd_seq_dummy snd_seq_oss af_packet snd_seq_midi_event snd_seq arc4 ecb usbhid snd_timer pcmcia crypto_blkcipher usb_storage snd_seq_device psmouse thinkpad_acpi iwl4965 iwlcore hid serio_raw libusual hci_usb sdhci mac80211 led_class snd parport_pc parport mmc_core ricoh_mmc yenta_socket rsrc_nonstatic pcmcia_core button soundcore cfg80211 nvram evdev snd_page_alloc ohci1394 ieee1394 ehci_hcd uhci_hcd usbcore e1000 thermal processor fan fuse
> [127227.095152]
> [127227.095152] Pid: 0, comm: swapper Not tainted (2.6.26-rc8-00089-ge1441b9 #24)
> [127227.095152] EIP: 0060:[<c011c5bb>] EFLAGS: 00010206 CPU: 0
> [127227.095152] EIP is at show_mem+0x8b/0x250
> [127227.095152] EAX: 01800000 EBX: 000c0000 ECX: 00000018 EDX: 01800000
> [127227.095152] ESI: c04b5700 EDI: 0013c000 EBP: c0536e10 ESP: c0536de8
> [127227.095152]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> [127227.095152] Process swapper (pid: 0, ti=c0536000 task=c04afa40 task.ti=c04e8000)
> [127227.095152] Stack: c04574fa 00000000 00088000 0000000b 00060e45 00002f19 000c0001 c04b6b24
> [127227.095152]        c04afa40 00004020 c0536e5c c016b067 c045fddc c04afd41 00000002 00004020
> [127227.095152]        c04b6b04 00000000 00000032 00000000 00000001 00000000 c04b6b00 00000002
> [127227.095152] Call Trace:
> [127227.095152]  [<c016b067>] ? __alloc_pages_internal+0x3d7/0x420
> [127227.095152]  [<c016b0c2>] ? __alloc_pages+0x12/0x20
> [127227.095152]  [<c016b102>] ? __get_free_pages+0x12/0x30
> [127227.095152]  [<c018d262>] ? __kmalloc_track_caller+0xd2/0x100
> [127227.095152]  [<c031bb44>] ? skb_copy+0x34/0x90
> [127227.095152]  [<c031b43b>] ? __alloc_skb+0x4b/0x100
> [127227.095152]  [<c031bb44>] ? skb_copy+0x34/0x90
> [127227.095152]  [<f8ba234b>] ? __ieee80211_rx_handle_packet+0x13b/0x1f0 [mac80211]
> [127227.095152]  [<f8ba2906>] ? __ieee80211_rx+0xb6/0xc0 [mac80211]
> [127227.095152]  [<f8b91ad3>] ? ieee80211_tasklet_handler+0x103/0x110 [mac80211]
> [127227.095152]  [<c013257b>] ? tasklet_action+0xcb/0xe0
> [127227.095152]  [<c0132161>] ? __do_softirq+0x81/0x110
> [127227.095152]  [<c0105f1e>] ? do_softirq+0x6e/0xd0
> [127227.095152]  [<c0160cd0>] ? handle_fasteoi_irq+0x0/0xd0
> [127227.095152]  [<c0132255>] ? irq_exit+0x45/0x50
> [127227.095152]  [<c0105da1>] ? do_IRQ+0x91/0xf0
> [127227.095152]  [<c010479b>] ? common_interrupt+0x23/0x28
> [127227.095152]  [<c014007b>] ? sys_timer_create+0xeb/0x2a0
> [127227.095152]  [<f8862079>] ? acpi_processor_idle+0x30f/0x47c [processor]
> [127227.095152]  [<f8861d6a>] ? acpi_processor_idle+0x0/0x47c [processor]
> [127227.095152]  [<c0102122>] ? cpu_idle+0x92/0xe0
> [127227.095152]  [<c038d6de>] ? rest_init+0x4e/0x50
> [127227.095152]  =======================
> [127227.095152] Code: f7 c3 ff 03 00 00 0f 84 bc 01 00 00 8b 86 34 14 00 00 ff 45 f0 01 d8 89 c2 c1 ea 11 8b 14 d5 00 a3 59 c0 c1 e0 05 83 e2 fc 01 c2 <8b> 0a 89 c8 c1 e8 17 83 e0 03 8d 04 80 c1 e0 08 05 00 57 4b c0
> [127227.095152] EIP: [<c011c5bb>] show_mem+0x8b/0x250 SS:ESP 0068:c0536de8
> [127227.704832] Kernel panic - not syncing: Fatal exception in interrupt
> 
> -- Dave
> 
> >From 55b1d0caade20e9597e07759d923f6ce1350e522 Mon Sep 17 00:00:00 2001
> From: Dave Hansen <dave@sr71.net>
> Date: Tue, 15 Jul 2008 10:32:56 -0700
> Subject: [PATCH] fix i386 show_mem() oops
> 
> I've had the occasional kernel hang with 2.6.26 since I
> upgraded my laptop to 4G of RAM.  But, I have a hole at
> 3-4GB, so I need PAE, and I'm running with SPARSEMEM=y.
> 
> I figured it was something to do with PAE, but never
> got a clean oops until this morning.  The oops was in
> show_mem()'s pgdat_page_nr().  It was passing a pfn of
> a page from the memory hole and oopsing.
> 
> Dumping my sparsemem section table, you can clearly see
> the hole:
> 
> 00000000  03 10 00 c1 00 02 00 c1  03 10 00 c1 80 02 00 c1  |................|
> 00000010  03 10 00 c1 00 03 00 c1  03 10 00 c1 80 03 00 c1  |................|
> 00000020  03 10 00 c1 00 04 00 c1  03 10 00 c1 80 04 00 c1  |................|
> 00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> 00000040  03 10 80 c0 00 05 00 c1  03 10 80 c0 80 05 00 c1  |................|
> 00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
> *
> 00000400
> 
> The sections are 512MB, and you can see 6 valid ones
> followed by two holes, and then two more valid ones.
> 
> Anyway, I believe this patch will fix the oops.

This looks like it might be suitable.  Can you please test it?

> ---
>  arch/x86/mm/pgtable_32.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
> index 369cf06..eb2a480 100644
> --- a/arch/x86/mm/pgtable_32.c
> +++ b/arch/x86/mm/pgtable_32.c
> @@ -37,6 +37,8 @@ void show_mem(void)
>  		for (i = 0; i < pgdat->node_spanned_pages; ++i) {
>  			if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
>  				touch_nmi_watchdog();
> +			if (!pfn_valid(pgdat->node_start_pfn + i))
> +				continue;
>  			page = pgdat_page_nr(pgdat, i);
>  			total++;
>  			if (PageHighMem(page))

What change caused this oops to turn up now?

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/20] generic show_mem() v5
  2008-07-15 20:22   ` Andrew Morton
  2008-07-15 20:22     ` Andrew Morton
@ 2008-07-15 20:33     ` Dave Hansen
  2008-07-16 21:51     ` Dave Hansen
  2 siblings, 0 replies; 37+ messages in thread
From: Dave Hansen @ 2008-07-15 20:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: hannes, linux-kernel, linux-arch, Ingo Molnar, Thomas Gleixner,
	stable

On Tue, 2008-07-15 at 13:22 -0700, Andrew Morton wrote:
> > The sections are 512MB, and you can see 6 valid ones
> > followed by two holes, and then two more valid ones.
> > 
> > Anyway, I believe this patch will fix the oops.
> 
> This looks like it might be suitable.  Can you please test it?

Yup, will do.  It's where I'm sending this email from, so I'll get to it
in a bit. :)

> > ---
> >  arch/x86/mm/pgtable_32.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
> > index 369cf06..eb2a480 100644
> > --- a/arch/x86/mm/pgtable_32.c
> > +++ b/arch/x86/mm/pgtable_32.c
> > @@ -37,6 +37,8 @@ void show_mem(void)
> >               for (i = 0; i < pgdat->node_spanned_pages; ++i) {
> >                       if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
> >                               touch_nmi_watchdog();
> > +                     if (!pfn_valid(pgdat->node_start_pfn + i))
> > +                             continue;
> >                       page = pgdat_page_nr(pgdat, i);
> >                       total++;
> >                       if (PageHighMem(page))
> 
> What change caused this oops to turn up now?

Me getting an extra 2GB (up to 4GB) of RAM for my laptop, which caused a
memory hole, which triggers only with SPARSEMEM=y.  Most people probably
don't run with sparsemem or a 32-bit kernel with that much RAM.

-- Dave

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/20] generic show_mem() v5
  2008-07-15 20:22   ` Andrew Morton
  2008-07-15 20:22     ` Andrew Morton
  2008-07-15 20:33     ` Dave Hansen
@ 2008-07-16 21:51     ` Dave Hansen
  2008-07-16 22:06       ` Andrew Morton
  2 siblings, 1 reply; 37+ messages in thread
From: Dave Hansen @ 2008-07-16 21:51 UTC (permalink / raw)
  To: Andrew Morton
  Cc: hannes, linux-kernel, linux-arch, Ingo Molnar, Thomas Gleixner,
	stable

On Tue, 2008-07-15 at 13:22 -0700, Andrew Morton wrote:
> 
> > The sections are 512MB, and you can see 6 valid ones
> > followed by two holes, and then two more valid ones.
> > 
> > Anyway, I believe this patch will fix the oops.
> 
> This looks like it might be suitable.  Can you please test it?

I compiled, tested, and booted on the machine that had this problem.  It
hasn't reappeared.

-- Dave

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/20] generic show_mem() v5
  2008-07-16 21:51     ` Dave Hansen
@ 2008-07-16 22:06       ` Andrew Morton
  0 siblings, 0 replies; 37+ messages in thread
From: Andrew Morton @ 2008-07-16 22:06 UTC (permalink / raw)
  To: Dave Hansen; +Cc: hannes, linux-kernel, linux-arch, mingo, tglx, stable

On Wed, 16 Jul 2008 14:51:40 -0700
Dave Hansen <dave@linux.vnet.ibm.com> wrote:

> On Tue, 2008-07-15 at 13:22 -0700, Andrew Morton wrote:
> > 
> > > The sections are 512MB, and you can see 6 valid ones
> > > followed by two holes, and then two more valid ones.
> > > 
> > > Anyway, I believe this patch will fix the oops.
> > 
> > This looks like it might be suitable.  Can you please test it?
> 
> I compiled, tested, and booted on the machine that had this problem.  It
> hasn't reappeared.
> 

Confused.   Did you have your patch applied or not?

I assume you did, in which case can you please send over a final
changelogged, titled and signed-off patch?

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2008-07-16 22:07 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-04 16:07 [PATCH 00/20] generic show_mem() v5 Johannes Weiner
2008-07-04 16:07 ` [PATCH 01/20] mm: print swapcache page count in show_swap_cache_info() Johannes Weiner
2008-07-04 16:07 ` [PATCH 02/20] lib: generic show_mem() Johannes Weiner
2008-07-05  8:34   ` Heiko Carstens
2008-07-05 11:29     ` Johannes Weiner
2008-07-05 11:54       ` Heiko Carstens
2008-07-04 16:07 ` [PATCH 03/20] alpha: use " Johannes Weiner
2008-07-04 16:07 ` [PATCH 04/20] avr32: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 05/20] blackfin: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 06/20] xtensa: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 07/20] x86: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 08/20] um: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 09/20] sparc64: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 10/20] sh: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 11/20] s390: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 12/20] powerpc: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 13/20] mn10300: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 14/20] h8300: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 15/20] mips: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 16/20] m68knommu: " Johannes Weiner
2008-07-05  8:11   ` Geert Uytterhoeven
2008-07-05 11:30     ` Johannes Weiner
2008-07-05 12:10       ` Johannes Weiner
2008-07-06  3:34   ` Greg Ungerer
2008-07-06  3:34     ` Greg Ungerer
2008-07-04 16:07 ` [PATCH 17/20] m68k: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 18/20] m32r: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 19/20] frv: " Johannes Weiner
2008-07-04 16:07 ` [PATCH 20/20] cris: " Johannes Weiner
2008-07-04 16:07   ` Johannes Weiner
2008-07-15 19:06 ` [PATCH 00/20] generic show_mem() v5 Dave Hansen
2008-07-15 19:06   ` Dave Hansen
2008-07-15 20:22   ` Andrew Morton
2008-07-15 20:22     ` Andrew Morton
2008-07-15 20:33     ` Dave Hansen
2008-07-16 21:51     ` Dave Hansen
2008-07-16 22:06       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).