public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* x86_64: remove debug code from arch_add_memory()
@ 2008-10-28 23:43 Gary Hade
  2008-10-29  8:30 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Hade @ 2008-10-28 23:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Thomas Gleixner, Yinghai Lu, garyhade


Gets rid of dmesg spam created during physical memory hot-add which
will very likely confuse users.  The change removes what appears to
be debugging code which I assume was unintentionally included in:
  x86: arch/x86/mm/init_64.c printk fixes
  commit 10f22dde556d1ed41d55355d1fb8ad495f9810c8

Signed-off-by: Gary Hade <garyhade@us.ibm.com>

---
 arch/x86/mm/init_64.c |    1 -
 1 file changed, 1 deletion(-)

Index: linux-2.6.28-rc2/arch/x86/mm/init_64.c
===================================================================
--- linux-2.6.28-rc2.orig/arch/x86/mm/init_64.c	2008-10-28 15:39:05.000000000 -0700
+++ linux-2.6.28-rc2/arch/x86/mm/init_64.c	2008-10-28 15:39:32.000000000 -0700
@@ -836,7 +836,6 @@
 		max_pfn_mapped = last_mapped_pfn;
 
 	ret = __add_pages(zone, start_pfn, nr_pages);
-	WARN_ON(1);
 
 	return ret;
 }

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

* Re: x86_64: remove debug code from arch_add_memory()
  2008-10-28 23:43 x86_64: remove debug code from arch_add_memory() Gary Hade
@ 2008-10-29  8:30 ` Ingo Molnar
  2008-10-29 16:43   ` Gary Hade
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-10-29  8:30 UTC (permalink / raw)
  To: Gary Hade; +Cc: linux-kernel, Thomas Gleixner, Yinghai Lu, H. Peter Anvin


* Gary Hade <garyhade@us.ibm.com> wrote:

> 
> Gets rid of dmesg spam created during physical memory hot-add which
> will very likely confuse users.  The change removes what appears to
> be debugging code which I assume was unintentionally included in:
>   x86: arch/x86/mm/init_64.c printk fixes
>   commit 10f22dde556d1ed41d55355d1fb8ad495f9810c8
> 
> Signed-off-by: Gary Hade <garyhade@us.ibm.com>
> 
> ---
>  arch/x86/mm/init_64.c |    1 -
>  1 file changed, 1 deletion(-)

applied to tip/x86/urgent, thanks Gary!

Note, i changed it slightly: instead of removing it completely i 
changed it to WARN_ON_ONCE(ret), to show us when __add_pages() fails. 
(which is what the original intention was there) This does not trigger 
in your tests, right?

	Ingo

--------------->
>From fe8b868eccb9f85a0e231e35f0abac5b39bac801 Mon Sep 17 00:00:00 2001
From: Gary Hade <garyhade@us.ibm.com>
Date: Tue, 28 Oct 2008 16:43:14 -0700
Subject: [PATCH] x86: remove debug code from arch_add_memory()

Impact: remove incorrect WARN_ON(1)

Gets rid of dmesg spam created during physical memory hot-add which
will very likely confuse users.  The change removes what appears to
be debugging code which I assume was unintentionally included in:

  x86: arch/x86/mm/init_64.c printk fixes
  commit 10f22dde556d1ed41d55355d1fb8ad495f9810c8

Signed-off-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/mm/init_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index ebe1811..9db01db 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -858,7 +858,7 @@ int arch_add_memory(int nid, u64 start, u64 size)
 		max_pfn_mapped = last_mapped_pfn;
 
 	ret = __add_pages(zone, start_pfn, nr_pages);
-	WARN_ON(1);
+	WARN_ON_ONCE(ret);
 
 	return ret;
 }

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

* Re: x86_64: remove debug code from arch_add_memory()
  2008-10-29  8:30 ` Ingo Molnar
@ 2008-10-29 16:43   ` Gary Hade
  0 siblings, 0 replies; 3+ messages in thread
From: Gary Hade @ 2008-10-29 16:43 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Gary Hade, linux-kernel, Thomas Gleixner, Yinghai Lu,
	H. Peter Anvin, lcm

On Wed, Oct 29, 2008 at 09:30:53AM +0100, Ingo Molnar wrote:
> 
> * Gary Hade <garyhade@us.ibm.com> wrote:
> 
> > 
> > Gets rid of dmesg spam created during physical memory hot-add which
> > will very likely confuse users.  The change removes what appears to
> > be debugging code which I assume was unintentionally included in:
> >   x86: arch/x86/mm/init_64.c printk fixes
> >   commit 10f22dde556d1ed41d55355d1fb8ad495f9810c8
> > 
> > Signed-off-by: Gary Hade <garyhade@us.ibm.com>
> > 
> > ---
> >  arch/x86/mm/init_64.c |    1 -
> >  1 file changed, 1 deletion(-)
> 
> applied to tip/x86/urgent, thanks Gary!
> 
> Note, i changed it slightly: instead of removing it completely i 
> changed it to WARN_ON_ONCE(ret), to show us when __add_pages() fails. 
> (which is what the original intention was there)

No problem!  That's obviously better.

> This does not trigger in your tests, right?

Correct.  I just did a memory hot-add with that change and the
WARN_ON_ONCE(ret) did not write anything to dmesg.

Thanks,
Gary

-- 
Gary Hade
System x Enablement
IBM Linux Technology Center
503-578-4503  IBM T/L: 775-4503
garyhade@us.ibm.com
http://www.ibm.com/linux/ltc


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

end of thread, other threads:[~2008-10-29 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-28 23:43 x86_64: remove debug code from arch_add_memory() Gary Hade
2008-10-29  8:30 ` Ingo Molnar
2008-10-29 16:43   ` Gary Hade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox