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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]