linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: max_mapnr config option
       [not found] <1207340609.26869.20.camel@nimitz.home.sr71.net>
@ 2008-04-10 10:33 ` Andy Whitcroft
  2008-04-10 10:40   ` [PATCH 1/8] alpha: mem_map/max_mapnr -- init is FLATMEM use correct defines Andy Whitcroft
                     ` (7 more replies)
       [not found] ` <20080407091756.GC17915@shadowen.org>
  1 sibling, 8 replies; 12+ messages in thread
From: Andy Whitcroft @ 2008-04-10 10:33 UTC (permalink / raw)
  To: Dave Hansen; +Cc: linux-mm, Jeremy Fitzhardinge, Johannes Weiner

On Fri, Apr 04, 2008 at 01:23:29PM -0700, Dave Hansen wrote:
> Hey Andy,
> 
> Take a look at include/linux/mm.h:
> 
> #ifndef CONFIG_DISCONTIGMEM          /* Don't use mapnrs, do it properly */
> extern unsigned long max_mapnr;
> #endif
> 
> Shouldn't that be #ifdef CONFIG_FLATMEM?
> 
> I don't think it is causing any problems since all references to
> max_mapnr are under FLATMEM ifdefs, but for correctness...

Ok, I did a comprehensive review of all the references, both to max_mapnr
and to mem_map which are both inherently FLATMEM specific variables.
It seems that there are actually a fair number of references which are
under inappropriate defines.  Generally this is the use of !DISCONTIGMEM
on architectures which only support FLATMEM and DISCONTIGMEM.  There are
also a number of unused constructs which can just go.

The biggest offenders of this are the show_mem implementations, but
it seems that Johannes (copied) is sorting that mess out; clearly one
implemenation is needed.  Johannes, I have some changes to that series
which came out of my implementation of the same which I will send your
way separatly.

Following this email is a set of patches which fix the problems I have
found.  Obviously these are all over the architecture map, and so will
probabally need feeding back via those trees individually.

-apw

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 1/8] alpha: mem_map/max_mapnr -- init is FLATMEM use correct defines
  2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
@ 2008-04-10 10:40   ` Andy Whitcroft
  2008-04-10 10:41   ` [PATCH 2/8] arm: " Andy Whitcroft
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Andy Whitcroft @ 2008-04-10 10:40 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Jeremy Fitzhardinge, Johannes Weiner, Andy Whitcroft, linux-mm

The alpha init.c implementation of mem_init is specifically a FLATMEM
implementation, use the correct config option.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/alpha/mm/init.c        |    4 ++--
 include/asm-alpha/mmzone.h  |    2 --
 include/asm-alpha/pgtable.h |    4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index 234e42b..9a4e669 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -277,7 +277,7 @@ srm_paging_stop (void)
 }
 #endif
 
-#ifndef CONFIG_DISCONTIGMEM
+#ifdef CONFIG_FLATMEM
 static void __init
 printk_memory_info(void)
 {
@@ -317,7 +317,7 @@ mem_init(void)
 
 	printk_memory_info();
 }
-#endif /* CONFIG_DISCONTIGMEM */
+#endif /* CONFIG_FLATMEM */
 
 void
 free_reserved_mem(void *start, void *end)
diff --git a/include/asm-alpha/mmzone.h b/include/asm-alpha/mmzone.h
index 8af56ce..8bfb3b2 100644
--- a/include/asm-alpha/mmzone.h
+++ b/include/asm-alpha/mmzone.h
@@ -72,8 +72,6 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
 
 #define virt_to_page(kaddr)	pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 
-#define VALID_PAGE(page)	(((page) - mem_map) < max_mapnr)
-
 #define pmd_page(pmd)		(pfn_to_page(pmd_val(pmd) >> 32))
 #define pgd_page(pgd)		(pfn_to_page(pgd_val(pgd) >> 32))
 #define pte_pfn(pte)		(pte_val(pte) >> 32)
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
index 99037b0..665ba5c 100644
--- a/include/asm-alpha/pgtable.h
+++ b/include/asm-alpha/pgtable.h
@@ -202,7 +202,7 @@ extern unsigned long __zero_page(void);
  * Conversion functions:  convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.
  */
-#ifndef CONFIG_DISCONTIGMEM
+#ifdef CONFIG_FLATMEM
 #define page_to_pa(page)	(((page) - mem_map) << PAGE_SHIFT)
 
 #define pte_pfn(pte)	(pte_val(pte) >> 32)
@@ -235,7 +235,7 @@ pmd_page_vaddr(pmd_t pmd)
 	return ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)) + PAGE_OFFSET;
 }
 
-#ifndef CONFIG_DISCONTIGMEM
+#ifdef CONFIG_FLATMEM
 #define pmd_page(pmd)	(mem_map + ((pmd_val(pmd) & _PFN_MASK) >> 32))
 #define pgd_page(pgd)	(mem_map + ((pgd_val(pgd) & _PFN_MASK) >> 32))
 #endif

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 2/8] arm: mem_map/max_mapnr -- init is FLATMEM use correct defines
  2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
  2008-04-10 10:40   ` [PATCH 1/8] alpha: mem_map/max_mapnr -- init is FLATMEM use correct defines Andy Whitcroft
@ 2008-04-10 10:41   ` Andy Whitcroft
  2008-04-10 10:41   ` [PATCH 3/8] m32r: mem_map/max_mapnr -- definition is specific to FLATMEM Andy Whitcroft
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Andy Whitcroft @ 2008-04-10 10:41 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Jeremy Fitzhardinge, Johannes Weiner, Andy Whitcroft, linux-mm

The initialisation of max_mapnr is only valid if the memory
model is FLATMEM, use the appropriate define.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/arm/mm/init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index b657f17..e414e83 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -426,7 +426,7 @@ void __init mem_init(void)
 	datapages = &_end - &__data_start;
 	initpages = &__init_end - &__init_begin;
 
-#ifndef CONFIG_DISCONTIGMEM
+#ifdef CONFIG_FLATMEM
 	max_mapnr   = virt_to_page(high_memory) - mem_map;
 #endif
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 3/8] m32r: mem_map/max_mapnr -- definition is specific to FLATMEM
  2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
  2008-04-10 10:40   ` [PATCH 1/8] alpha: mem_map/max_mapnr -- init is FLATMEM use correct defines Andy Whitcroft
  2008-04-10 10:41   ` [PATCH 2/8] arm: " Andy Whitcroft
@ 2008-04-10 10:41   ` Andy Whitcroft
  2008-04-10 10:41   ` [PATCH 4/8] mips: " Andy Whitcroft
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Andy Whitcroft @ 2008-04-10 10:41 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Jeremy Fitzhardinge, Johannes Weiner, Andy Whitcroft, linux-mm

The max_mapnr variable is only used FLATMEM memory model, use the
appropriate defines.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/m32r/mm/init.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c
index 2a3e8b5..f4a614f 100644
--- a/arch/m32r/mm/init.c
+++ b/arch/m32r/mm/init.c
@@ -148,9 +148,9 @@ void __init mem_init(void)
 
 	num_physpages -= hole_pages;
 
-#ifndef CONFIG_DISCONTIGMEM
+#ifdef CONFIG_FLATMEM
 	max_mapnr = num_physpages;
-#endif	/* CONFIG_DISCONTIGMEM */
+#endif	/* CONFIG_FLATMEM */
 
 #ifdef CONFIG_MMU
 	high_memory = (void *)__va(PFN_PHYS(MAX_LOW_PFN(0)));

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 4/8] mips: mem_map/max_mapnr -- definition is specific to FLATMEM
  2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
                     ` (2 preceding siblings ...)
  2008-04-10 10:41   ` [PATCH 3/8] m32r: mem_map/max_mapnr -- definition is specific to FLATMEM Andy Whitcroft
@ 2008-04-10 10:41   ` Andy Whitcroft
  2008-04-10 10:41   ` [PATCH 5/8] parisc: " Andy Whitcroft
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Andy Whitcroft @ 2008-04-10 10:41 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Jeremy Fitzhardinge, Johannes Weiner, Andy Whitcroft, linux-mm

The max_mapnr variable is only used FLATMEM memory model, use the
appropriate defines.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/mips/mm/init.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index c7aed13..68c90b5 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -389,19 +389,22 @@ static struct kcore_list kcore_mem, kcore_vmalloc;
 static struct kcore_list kcore_kseg0;
 #endif
 
+#if defined(CONFIG_HIGHMEM) && defined(CONFIG_DISCONTIGMEM)
+#error "CONFIG_HIGHMEM and CONFIG_DISCONTIGMEM dont work together yet"
+#endif
+
 void __init mem_init(void)
 {
 	unsigned long codesize, reservedpages, datasize, initsize;
 	unsigned long tmp, ram;
 
+#ifdef CONFIG_FLATMEM
 #ifdef CONFIG_HIGHMEM
-#ifdef CONFIG_DISCONTIGMEM
-#error "CONFIG_HIGHMEM and CONFIG_DISCONTIGMEM dont work together yet"
-#endif
 	max_mapnr = highend_pfn;
 #else
 	max_mapnr = max_low_pfn;
 #endif
+#endif
 	high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
 
 	totalram_pages += free_all_bootmem();

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 5/8] parisc: mem_map/max_mapnr -- definition is specific to FLATMEM
  2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
                     ` (3 preceding siblings ...)
  2008-04-10 10:41   ` [PATCH 4/8] mips: " Andy Whitcroft
@ 2008-04-10 10:41   ` Andy Whitcroft
  2008-04-10 10:41   ` [PATCH 6/8] powerpc: " Andy Whitcroft
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Andy Whitcroft @ 2008-04-10 10:41 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Jeremy Fitzhardinge, Johannes Weiner, Andy Whitcroft, linux-mm

The max_mapnr variable is only used FLATMEM memory model, use the
appropriate defines.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/parisc/mm/init.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 2c721e1..bd300d1 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -461,10 +461,11 @@ void __init mem_init(void)
 
 	high_memory = __va((max_pfn << PAGE_SHIFT));
 
-#ifndef CONFIG_DISCONTIGMEM
+#ifdef CONFIG_FLATMEM
 	max_mapnr = page_to_pfn(virt_to_page(high_memory - 1)) + 1;
 	totalram_pages += free_all_bootmem();
-#else
+#endif
+#ifdef CONFIG_DISCONTIGMEM
 	{
 		int i;
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 6/8] powerpc: mem_map/max_mapnr -- definition is specific to FLATMEM
  2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
                     ` (4 preceding siblings ...)
  2008-04-10 10:41   ` [PATCH 5/8] parisc: " Andy Whitcroft
@ 2008-04-10 10:41   ` Andy Whitcroft
  2008-04-10 10:41   ` [PATCH 7/8] sparc64: " Andy Whitcroft
  2008-04-10 10:41   ` [PATCH 8/8] mem_map/max_mapnr are specific to the FLATMEM memory model Andy Whitcroft
  7 siblings, 0 replies; 12+ messages in thread
From: Andy Whitcroft @ 2008-04-10 10:41 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Jeremy Fitzhardinge, Johannes Weiner, Andy Whitcroft, linux-mm

The max_mapnr variable is only used FLATMEM memory model, use the
appropriate defines.  Note that HIGHMEM is only valid on PPC32, and that
only supports FLATMEM.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/powerpc/mm/mem.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index fcbae37..09d275e 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -319,9 +319,11 @@ void __init mem_init(void)
 		}
 	}
 #else
-	max_mapnr = max_pfn;
 	totalram_pages += free_all_bootmem();
 #endif
+#ifdef CONFIG_FLATMEM
+	max_mapnr = max_pfn;
+#endif
 	for_each_online_pgdat(pgdat) {
 		for (i = 0; i < pgdat->node_spanned_pages; i++) {
 			if (!pfn_valid(pgdat->node_start_pfn + i))
@@ -337,7 +339,7 @@ void __init mem_init(void)
 	initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin;
 	bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start;
 
-#ifdef CONFIG_HIGHMEM
+#if defined(CONFIG_FLATMEM) && defined(CONFIG_HIGHMEM)
 	{
 		unsigned long pfn, highmem_mapnr;
 
@@ -356,7 +358,7 @@ void __init mem_init(void)
 		printk(KERN_DEBUG "High memory: %luk\n",
 		       totalhigh_pages << (PAGE_SHIFT-10));
 	}
-#endif /* CONFIG_HIGHMEM */
+#endif /* CONFIG_FLATMEM/CONFIG_HIGHMEM */
 
 	printk(KERN_INFO "Memory: %luk/%luk available (%luk kernel code, "
 	       "%luk reserved, %luk data, %luk bss, %luk init)\n",

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 7/8] sparc64: mem_map/max_mapnr -- definition is specific to FLATMEM
  2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
                     ` (5 preceding siblings ...)
  2008-04-10 10:41   ` [PATCH 6/8] powerpc: " Andy Whitcroft
@ 2008-04-10 10:41   ` Andy Whitcroft
  2008-04-10 10:41   ` [PATCH 8/8] mem_map/max_mapnr are specific to the FLATMEM memory model Andy Whitcroft
  7 siblings, 0 replies; 12+ messages in thread
From: Andy Whitcroft @ 2008-04-10 10:41 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Jeremy Fitzhardinge, Johannes Weiner, Andy Whitcroft, linux-mm

The max_mapnr variable is only used FLATMEM memory model, as sparc64
only supports SPARSEMEM this variable is redundant.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/sparc64/mm/init.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index f6a86a2..c218134 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -1330,8 +1330,6 @@ void __init paging_init(void)
 	pages_avail = 0;
 	last_valid_pfn = end_pfn = bootmem_init(&pages_avail, phys_base);
 
-	max_mapnr = last_valid_pfn;
-
 	kernel_physical_mapping_init();
 
 	real_setup_per_cpu_areas();

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 8/8] mem_map/max_mapnr are specific to the FLATMEM memory model
  2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
                     ` (6 preceding siblings ...)
  2008-04-10 10:41   ` [PATCH 7/8] sparc64: " Andy Whitcroft
@ 2008-04-10 10:41   ` Andy Whitcroft
  2008-06-02 15:13     ` Jeremy Fitzhardinge
  7 siblings, 1 reply; 12+ messages in thread
From: Andy Whitcroft @ 2008-04-10 10:41 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Jeremy Fitzhardinge, Johannes Weiner, Andy Whitcroft, linux-mm

mem_map and max_mapnr are variables used in the FLATMEM memory model
only.  Ensure they are only defined when that memory model is enabled.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 mm/memory.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index 0d14d1e..091324e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -61,8 +61,7 @@
 #include <linux/swapops.h>
 #include <linux/elf.h>
 
-#ifndef CONFIG_NEED_MULTIPLE_NODES
-/* use the per-pgdat data instead for discontigmem - mbligh */
+#ifdef CONFIG_FLATMEM
 unsigned long max_mapnr;
 struct page *mem_map;
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: max_mapnr config option
       [not found]     ` <20080408105137.GD17915@shadowen.org>
@ 2008-05-23 13:09       ` apw
  2008-05-23 19:52         ` Johannes Weiner
  0 siblings, 1 reply; 12+ messages in thread
From: apw @ 2008-05-23 13:09 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: Dave Hansen, linux-mm, Jeremy Fitzhardinge

On Tue, Apr 08, 2008 at 11:51:38AM +0100, Andy Whitcroft wrote:
> On Mon, Apr 07, 2008 at 12:03:53PM +0200, Johannes Weiner wrote:
> > Hi,
> > 
> > Andy Whitcroft <apw@shadowen.org> writes:
> > 
> > > BUT.  Looking over the actual references, there is a lot of references
> > > occuring out of show_mem implementations in the arches which may well break
> > > unless they follow suit.  We also don't have any show_mem implementation
> > > for sparsemem.  I will have a look at what can be trivially cleaned
> > > up here.
> > 
> > Perhaps you might be interested in http://lkml.org/lkml/2008/4/4/ .
> 
> How annoying is that, you have done the same thing I've just done.  I'll
> look at your version and base off that.

Whatever happened to this series.  I don't see it committed anywhere.
Do you have a latest stack I could rebase my max_mapnr fixes off?

-apw

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: max_mapnr config option
  2008-05-23 13:09       ` max_mapnr config option apw
@ 2008-05-23 19:52         ` Johannes Weiner
  0 siblings, 0 replies; 12+ messages in thread
From: Johannes Weiner @ 2008-05-23 19:52 UTC (permalink / raw)
  To: apw; +Cc: Dave Hansen, linux-mm, Jeremy Fitzhardinge

Hi,

apw@shadowen.org writes:

> On Tue, Apr 08, 2008 at 11:51:38AM +0100, Andy Whitcroft wrote:
>> On Mon, Apr 07, 2008 at 12:03:53PM +0200, Johannes Weiner wrote:
>> > Hi,
>> > 
>> > Andy Whitcroft <apw@shadowen.org> writes:
>> > 
>> > > BUT.  Looking over the actual references, there is a lot of references
>> > > occuring out of show_mem implementations in the arches which may well break
>> > > unless they follow suit.  We also don't have any show_mem implementation
>> > > for sparsemem.  I will have a look at what can be trivially cleaned
>> > > up here.
>> > 
>> > Perhaps you might be interested in http://lkml.org/lkml/2008/4/4/ .
>> 
>> How annoying is that, you have done the same thing I've just done.  I'll
>> look at your version and base off that.
>
> Whatever happened to this series.  I don't see it committed anywhere.
> Do you have a latest stack I could rebase my max_mapnr fixes off?

I rebased it against Linus' current tree.  Not all parts of the `remove
redundant output of free swap space' series have yet trickled into
upstream, so what I give you includes that (it is minimal and should
have been part of this series in the first place).

When all of the previous series hit mainline I will repost this one.

Here is the quilt series:

  http://saeurebad.de/patches/generic-show_mem.tar

or unpacked without the `.tar'-suffix.

	Hannes

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 8/8] mem_map/max_mapnr are specific to the FLATMEM memory model
  2008-04-10 10:41   ` [PATCH 8/8] mem_map/max_mapnr are specific to the FLATMEM memory model Andy Whitcroft
@ 2008-06-02 15:13     ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 12+ messages in thread
From: Jeremy Fitzhardinge @ 2008-06-02 15:13 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: Dave Hansen, Johannes Weiner, linux-mm

Andy Whitcroft wrote:
> mem_map and max_mapnr are variables used in the FLATMEM memory model
> only.  Ensure they are only defined when that memory model is enabled.
>   

Is this series queued to be applied?

BTW, how does max_mapnr differ from x86-64's end_pfn?

> Signed-off-by: Andy Whitcroft <apw@shadowen.org>
> ---
>  mm/memory.c |    3 +--
>   

I think you need to fix the declaration in linux/mm.h as well.

>  1 files changed, 1 insertions(+), 2 deletions(-)
> diff --git a/mm/memory.c b/mm/memory.c
> index 0d14d1e..091324e 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -61,8 +61,7 @@
>  #include <linux/swapops.h>
>  #include <linux/elf.h>
>  
> -#ifndef CONFIG_NEED_MULTIPLE_NODES
> -/* use the per-pgdat data instead for discontigmem - mbligh */
> +#ifdef CONFIG_FLATMEM
>  unsigned long max_mapnr;
>  struct page *mem_map;
>  
>   

Thanks,
    J

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2008-06-02 15:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1207340609.26869.20.camel@nimitz.home.sr71.net>
2008-04-10 10:33 ` max_mapnr config option Andy Whitcroft
2008-04-10 10:40   ` [PATCH 1/8] alpha: mem_map/max_mapnr -- init is FLATMEM use correct defines Andy Whitcroft
2008-04-10 10:41   ` [PATCH 2/8] arm: " Andy Whitcroft
2008-04-10 10:41   ` [PATCH 3/8] m32r: mem_map/max_mapnr -- definition is specific to FLATMEM Andy Whitcroft
2008-04-10 10:41   ` [PATCH 4/8] mips: " Andy Whitcroft
2008-04-10 10:41   ` [PATCH 5/8] parisc: " Andy Whitcroft
2008-04-10 10:41   ` [PATCH 6/8] powerpc: " Andy Whitcroft
2008-04-10 10:41   ` [PATCH 7/8] sparc64: " Andy Whitcroft
2008-04-10 10:41   ` [PATCH 8/8] mem_map/max_mapnr are specific to the FLATMEM memory model Andy Whitcroft
2008-06-02 15:13     ` Jeremy Fitzhardinge
     [not found] ` <20080407091756.GC17915@shadowen.org>
     [not found]   ` <87iqyuhth2.fsf@saeurebad.de>
     [not found]     ` <20080408105137.GD17915@shadowen.org>
2008-05-23 13:09       ` max_mapnr config option apw
2008-05-23 19:52         ` Johannes Weiner

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