mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: mel@skynet.ie (Mel Gorman)
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.21-rc3-mm2 (oops in move_freepages)
Date: Wed, 14 Mar 2007 16:13:27 +0000	[thread overview]
Message-ID: <20070314161327.GA14416@skynet.ie> (raw)
In-Reply-To: <200703140911.16537.bjorn.helgaas@hp.com>

On (14/03/07 09:11), Bjorn Helgaas didst pronounce:
> On Wednesday 14 March 2007 03:44, Mel Gorman wrote:
> > Please try the following patch from Yasunori Goto.
> > ...
> > --- current_test.orig/mm/page_alloc.c	2007-03-08 15:44:10.000000000 +0900
> > +++ current_test/mm/page_alloc.c	2007-03-08 16:17:29.000000000 +0900
> > @@ -707,7 +707,7 @@ int move_freepages(struct zone *zone,
> >  	unsigned long order;
> >  	int blocks_moved = 0;
> >  
> > -	BUG_ON(page_zone(start_page) != page_zone(end_page));
> > +	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
> >  
> 
> I should have mentioned that I already tried this patch.  The
> oops still occurs, although now it's when loading the value
> pointed to by "end_page - 1" instead of "end_page".

Ok. This looks like another case of HOLES_IN_ZONE hilarity with page_zone().
As I take a new look at the BUG_ON check in move_freepages(), it isn't even
necessary as move_freepages_block() already checks the zone boundaries.  At a
later date when the code has survived a while without new bug reports, I'll
submit a patch that simply deletes this check because it should be redundant.
Just in case, I'd like to preserve the check in the non-HOLES_IN_ZONE
case for now.

Can you try this patch please? It should apply on top of Yasunori Goto's
patch.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.21-rc3-mm2-goto/mm/page_alloc.c linux-2.6.21-rc3-mm2-bjorn_testfix/mm/page_alloc.c
--- linux-2.6.21-rc3-mm2-goto/mm/page_alloc.c	2007-03-14 16:07:23.000000000 +0000
+++ linux-2.6.21-rc3-mm2-bjorn_testfix/mm/page_alloc.c	2007-03-14 16:01:00.000000000 +0000
@@ -707,7 +707,15 @@ int move_freepages(struct zone *zone,
 	unsigned long order;
 	int blocks_moved = 0;
 
+#ifndef CONFIG_HOLES_IN_ZONE
+	/*
+	 * page_zone is not safe to call in this context when
+	 * CONFIG_HOLES_IN_ZONE is set but this bug check is
+	 * redundant anyway as we check zone boundaries in
+	 * move_freepages_block()
+	 */
 	BUG_ON(page_zone(start_page) != page_zone(end_page - 1));
+#endif
 
 	for (page = start_page; page < end_page;) {
 		if (!PageBuddy(page)) {

  reply	other threads:[~2007-03-14 16:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08  4:19 2.6.21-rc3-mm2 Andrew Morton
2007-03-08  7:39 ` [PATCH] fix BUG_ON check at move_freepages() (Re: 2.6.21-rc3-mm2) Yasunori Goto
2007-03-08 11:01   ` Mel Gorman
2007-03-08 14:52 ` 2.6.21-rc3-mm2 Con Kolivas
2007-03-08 21:04   ` 2.6.21-rc3-mm2 Con Kolivas
2007-03-08 21:56   ` 2.6.21-rc3: /proc broken Con Kolivas
2007-03-09  8:53     ` Russell King
2007-03-09  9:59       ` Con Kolivas
2007-03-12 12:56 ` 2.6.21-rc3-mm2 hangs my opteron during bootup, ACPI? Helge Hafting
2007-03-12 13:25   ` Luming Yu
2007-03-12 19:56     ` Len Brown
2007-03-17  0:10       ` Helge Hafting
2007-03-14  3:52 ` 2.6.21-rc3-mm2 (oops in move_freepages) Bjorn Helgaas
2007-03-14  9:44   ` Mel Gorman
2007-03-14 15:11     ` Bjorn Helgaas
2007-03-14 16:13       ` Mel Gorman [this message]
2007-03-14 16:52         ` Bjorn Helgaas
2007-03-14 17:21           ` Mel Gorman
2007-03-14 18:36             ` Bjorn Helgaas
2007-03-14 18:59               ` Mel Gorman
2007-03-14 20:46                 ` Bjorn Helgaas
2007-03-14 20:55                   ` Mel Gorman
2007-03-14 19:10               ` [PATCH] Avoid unsafe use of struct pages in move_freepages when CONFIG_HOLES_IN_ZONE is set Mel Gorman
     [not found] ` <200703141457.06489.bjorn.helgaas@hp.com>
2007-03-15  1:14   ` 2.6.21-rc3-mm2 (BUG in pci_restore_state()) Eric W. Biederman
2007-03-19 19:17 ` 2.6.21-rc3-mm2 Randy Dunlap
2007-03-19 19:55   ` 2.6.21-rc3-mm2 Andrew Morton
2007-03-19 23:01     ` 2.6.21-rc3-mm2 Kay Sievers
2007-03-19 19:40 ` 2.6.21-rc3-mm2 Randy Dunlap
2007-03-19 22:26   ` [PATCH] ptrace needs PROC_FS Randy Dunlap
2007-03-19 22:48     ` Roland McGrath
2007-03-20 11:18       ` Pavel Machek
2007-03-20  0:27 ` 2.6.21-rc3-mm2 Randy Dunlap
2007-03-20  0:39   ` 2.6.21-rc3-mm2 Andrew Morton
2007-03-20  0:51     ` 2.6.21-rc3-mm2 Randy Dunlap
2007-03-20 18:51     ` 2.6.21-rc3-mm2 Roland McGrath
2007-03-20 12:14   ` 2.6.21-rc3-mm2 Sam Ravnborg
2007-03-20 15:43     ` 2.6.21-rc3-mm2 Randy Dunlap

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=20070314161327.GA14416@skynet.ie \
    --to=mel@skynet.ie \
    --cc=akpm@linux-foundation.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®