All of lore.kernel.org
 help / color / mirror / Atom feed
From: MIke Galbraith <efault@gmx.de>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [k2.6.16-rc1-mm5] kernel BUG at include/linux/mm.h:302!
Date: Thu, 09 Feb 2006 14:53:07 +0100	[thread overview]
Message-ID: <1139493187.7618.4.camel@homer> (raw)
In-Reply-To: <43EB393F.1070409@yahoo.com.au>

On Thu, 2006-02-09 at 23:44 +1100, Nick Piggin wrote:
> Andrew Morton wrote:

> >> (or Nick, do you have the supposed fix handy?)
> > 
> > 
> > Yeah, I'm still scratching my head over the mystery fix.
> > 
> > 
> 
> The mm/swap.c hunk from git 8519fb30e438f8088b71a94a7d5a660a814d3872
> is the mystery fix (the mm.h hunk is already in there).
> 
> I suppose you'd better verify that -mm works fine with the patch as
> well, when you get time.

Verified.  rc2-mm1 worked fine, and plugging the extracted bit below
into rc1-mm5 fixed it's BUG.

	Thanks,

	-Mike

--- linux-2.6.16-rc1-mm5/mm/swap.c	2006-02-09 05:38:11.000000000 +0100
+++ linux-2.6.16-rc2-mm1/mm/swap.c	2006-02-09 13:04:04.000000000 +0100
@@ -34,19 +34,22 @@
 /* How many pages do we try to swap or page in/out together? */
 int page_cluster;
 
-void put_page(struct page *page)
+static void put_compound_page(struct page *page)
 {
-	if (unlikely(PageCompound(page))) {
-		page = (struct page *)page_private(page);
-		if (put_page_testzero(page)) {
-			void (*dtor)(struct page *page);
+	page = (struct page *)page_private(page);
+	if (put_page_testzero(page)) {
+		void (*dtor)(struct page *page);
 
-			dtor = (void (*)(struct page *))page[1].mapping;
-			(*dtor)(page);
-		}
-		return;
+		dtor = (void (*)(struct page *))page[1].mapping;
+		(*dtor)(page);
 	}
-	if (put_page_testzero(page))
+}
+
+void put_page(struct page *page)
+{
+	if (unlikely(PageCompound(page)))
+		put_compound_page(page);
+	else if (put_page_testzero(page))
 		__page_cache_release(page);
 }
 EXPORT_SYMBOL(put_page);
@@ -242,6 +245,15 @@
 	for (i = 0; i < nr; i++) {
 		struct page *page = pages[i];
 
+		if (unlikely(PageCompound(page))) {
+			if (zone) {
+				spin_unlock_irq(&zone->lru_lock);
+				zone = NULL;
+			}
+			put_compound_page(page);
+			continue;
+		}
+
 		if (!put_page_testzero(page))
 			continue;
 
@@ -265,7 +277,7 @@
 			}
 			__pagevec_free(&pages_to_free);
 			pagevec_reinit(&pages_to_free);
-		}
+  		}
 	}
 	if (zone)
 		spin_unlock_irq(&zone->lru_lock);



  reply	other threads:[~2006-02-09 13:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-09  8:24 [k2.6.16-rc1-mm5] kernel BUG at include/linux/mm.h:302! MIke Galbraith
2006-02-09  8:38 ` Nick Piggin
2006-02-09  8:47   ` Andrew Morton
2006-02-09  9:50     ` MIke Galbraith
2006-02-09 10:11       ` Andrew Morton
2006-02-09 12:44         ` Nick Piggin
2006-02-09 13:53           ` MIke Galbraith [this message]
2006-02-09 14:11             ` Nick Piggin
2006-02-09  8:59   ` MIke Galbraith
2006-02-09  8:46 ` Andrew Morton
2006-02-09  9:05   ` MIke Galbraith

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=1139493187.7618.4.camel@homer \
    --to=efault@gmx.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.