* Re: [PATCH] Disable useless bootmem warning
2004-02-16 17:00 [PATCH] Disable useless bootmem warning Andi Kleen
@ 2004-02-16 16:52 ` Ben Collins
2004-02-16 19:13 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Ben Collins @ 2004-02-16 16:52 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel, akpm, mingo
> I've never seen a bug uncovered by this warning too. I considered to disable it
> by passing a special array of "ok to reserve twice" regions, but on second thought
> it is just best to remove it completely. Reserving things twice is not usually
> an error.
I have. When I was working to get sparc64 booting from alternate memory
(other than 0x0 physical), those messages helped me a lot.
Maybe make it ifdef'd by CONFIG_DEBUG_BOOTMEM (which is an option that I
know sparc and sparc64 already have).
--
Debian - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Disable useless bootmem warning
@ 2004-02-16 17:00 Andi Kleen
2004-02-16 16:52 ` Ben Collins
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2004-02-16 17:00 UTC (permalink / raw)
To: linux-kernel, akpm, mingo
This bootmem warning has been annoying me forever:
hm, page 000f5000 reserved twice.
hm, page 000f6000 reserved twice.
hm, page 000f1000 reserved twice.
hm, page 000f2000 reserved twice.
It happens because the i386/x86-64 boot code prereserves the mptable and then later bootmem
tries to reserve it again because it's marked reserved in the e820 map.
I've never seen a bug uncovered by this warning too. I considered to disable it
by passing a special array of "ok to reserve twice" regions, but on second thought
it is just best to remove it completely. Reserving things twice is not usually
an error.
This patch does this.
-Andi
--- linux-2.6.3rc2-amd64/mm/bootmem.c-o 2004-02-11 22:06:58.000000000 +0100
+++ linux-2.6.3rc2-amd64/mm/bootmem.c 2004-02-16 17:52:05.000000000 +0100
@@ -91,8 +91,7 @@
if (end > bdata->node_low_pfn)
BUG();
for (i = sidx; i < eidx; i++)
- if (test_and_set_bit(i, bdata->node_bootmem_map))
- printk("hm, page %08lx reserved twice.\n", i*PAGE_SIZE);
+ set_bit(i, bdata->node_bootmem_map);
}
static void __init free_bootmem_core(bootmem_data_t *bdata, unsigned long addr, unsigned long size)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Disable useless bootmem warning
2004-02-16 16:52 ` Ben Collins
@ 2004-02-16 19:13 ` Andi Kleen
0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2004-02-16 19:13 UTC (permalink / raw)
To: Ben Collins; +Cc: linux-kernel, akpm, mingo
On Mon, 16 Feb 2004 11:52:11 -0500
Ben Collins <bcollins@debian.org> wrote:
> > I've never seen a bug uncovered by this warning too. I considered to disable it
> > by passing a special array of "ok to reserve twice" regions, but on second thought
> > it is just best to remove it completely. Reserving things twice is not usually
> > an error.
>
> I have. When I was working to get sparc64 booting from alternate memory
> (other than 0x0 physical), those messages helped me a lot.
>
> Maybe make it ifdef'd by CONFIG_DEBUG_BOOTMEM (which is an option that I
> know sparc and sparc64 already have).
That would be fine by me too. Anything, as long as I don't have to see them ;-)
Here's a new patch.
-Andi
diff -u linux-2.6.2-work32/mm/bootmem.c-o linux-2.6.2-work32/mm/bootmem.c
--- linux-2.6.2-work32/mm/bootmem.c-o 2004-02-11 22:06:58.000000000 +0100
+++ linux-2.6.2-work32/mm/bootmem.c 2004-02-16 20:11:10.000000000 +0100
@@ -91,8 +91,11 @@
if (end > bdata->node_low_pfn)
BUG();
for (i = sidx; i < eidx; i++)
- if (test_and_set_bit(i, bdata->node_bootmem_map))
+ if (test_and_set_bit(i, bdata->node_bootmem_map)) {
+#ifdef CONFIG_DEBUG_BOOTMEM
printk("hm, page %08lx reserved twice.\n", i*PAGE_SIZE);
+#endif
+ }
}
static void __init free_bootmem_core(bootmem_data_t *bdata, unsigned long addr, unsigned long size)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-16 17:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-16 17:00 [PATCH] Disable useless bootmem warning Andi Kleen
2004-02-16 16:52 ` Ben Collins
2004-02-16 19:13 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox