public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Bob Picco <bob.picco@hp.com>
Cc: john stultz <johnstul@us.ibm.com>,
	Chuck Ebbert <cebbert@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Sripathi Kodi <sripathik@in.ibm.com>,
	Bernhard Walle <bwalle@suse.de>,
	acme@redhat.com, tglx@linutronix.de, akpm@linux-foundation.org,
	andi@firstfloor.org
Subject: Re: [BUG] sysrq-m oops
Date: Fri, 08 Jun 2007 17:07:16 +0100	[thread overview]
Message-ID: <46697EB4.5060003@shadowen.org> (raw)
In-Reply-To: <20070608010056.GF11999@localhost>

Bob Picco wrote:
> john stultz wrote:	[Thu Jun 07 2007, 03:54:41PM EDT]
> [snip]
> john you are welcome.
> 
> We aren't sampling for holes in memory. Thus we encounter a section hole with
> empty section map pointer for SPARSEMEM and OOPs for show_mem. This issue
> has been seen in 2.6.21, current git and current mm. The patch below
> is for mainline and mm. It was boot tested for SPARSEMEM, current
> VMEMMAP of Andy's in mm ml and DISCONTIGMEM. A slightly different patch
> will be posted to stable for 2.6.21.
> 
> Previous to commit f0a5a58aa812b31fd9f197c4ba48245942364eae memory_present
> was called for node_start_pfn to node_end_pfn. This would cover the hole(s)
> with reserved pages and valid sections. Most SPARSEMEM supported arches
> do a pfn_valid check in show_mem before computing the page structure address.
> 
> This issue was brought to my attention on IRC by Arnaldo Carvalho de Melo at
> acme@redhat.com. Thanks to Arnaldo for testing.
> 
> Signed-off-by: Bob Picco <bob.picco@hp.com>
> 
>  arch/x86_64/mm/init.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux-2.6.22-rc4-mm1/arch/x86_64/mm/init.c
> ===================================================================
> --- linux-2.6.22-rc4-mm1.orig/arch/x86_64/mm/init.c	2007-06-06 12:59:26.000000000 -0400
> +++ linux-2.6.22-rc4-mm1/arch/x86_64/mm/init.c	2007-06-07 11:14:31.000000000 -0400
> @@ -79,6 +79,8 @@ void show_mem(void)
>  			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))

Yes this is required with SPARSEMEM.  Good spot.

Acked-by: Andy Whitcroft <apw@shadowen.org>

-apw

  reply	other threads:[~2007-06-08 16:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07  0:27 [BUG] sysrq-m oops john stultz
2007-06-07 15:42 ` Chuck Ebbert
2007-06-07 18:21   ` Bob Picco
2007-06-07 19:54     ` john stultz
2007-06-08  1:00       ` Bob Picco
2007-06-08 16:07         ` Andy Whitcroft [this message]
2007-06-07 20:39     ` Andy Whitcroft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46697EB4.5060003@shadowen.org \
    --to=apw@shadowen.org \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=bob.picco@hp.com \
    --cc=bwalle@suse.de \
    --cc=cebbert@redhat.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sripathik@in.ibm.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox