public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Rik van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-testers@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: 2.6.26-rc5-mm2: OOM with 1G free swap
Date: Wed, 11 Jun 2008 23:44:17 +1000	[thread overview]
Message-ID: <200806112344.17627.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20080611085724.1c18164f@bree.surriel.com>

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

On Wednesday 11 June 2008 22:57, Rik van Riel wrote:
> On Tue, 10 Jun 2008 23:27:05 -0700
>
> Andrew Morton <akpm@linux-foundation.org> wrote:
> > Well I assume that Rik ran LTP.  Perhaps a merge problem.
> >
> > Zero pages on active_anon and inactive_anon.  I suspect we lost those
> > pages.
>
> Known problem.  I fixed this one in the updates I sent you last night.

Oh good. Yeah I was just running some tests, and got as far as verifying
that the upstream kernel + lockless pagecache patches reclaims file pages
like a dream, but -mm2 sucks very badly at it.

During which, I also did find by inspection a little problem with my
speculative references patch. Andrew please apply this fix.


[-- Attachment #2: mm-speculative-page-references-hugh-fix3.patch --]
[-- Type: text/x-diff, Size: 1527 bytes --]

Fix the VM_BUG_ON assertion check to actually do what I want, noted by
Christoph.

Also, fix an error-path-leak type issue with frozen refcount not being
unfrozen. Found by review. In practice, this check is very rare to hit
because a page dirtier is likely to hold the refcount elevated for much
longer than it takes to check and non-racy-recheck. So it doesn't pose
a big problem for users of -mm, but of course needs fixing.

---
Index: linux-2.6/mm/vmscan.c
===================================================================
--- linux-2.6.orig/mm/vmscan.c	2008-06-11 23:36:07.000000000 +1000
+++ linux-2.6/mm/vmscan.c	2008-06-11 23:36:18.000000000 +1000
@@ -415,8 +415,10 @@ static int __remove_mapping(struct addre
 	if (!page_freeze_refs(page, 2))
 		goto cannot_free;
 	/* note: atomic_cmpxchg in page_freeze_refs provides the smp_rmb */
-	if (unlikely(PageDirty(page)))
+	if (unlikely(PageDirty(page))) {
+		page_unfreeze_refs(page, 2);
 		goto cannot_free;
+	}
 
 	if (PageSwapCache(page)) {
 		swp_entry_t swap = { .val = page_private(page) };
Index: linux-2.6/include/linux/pagemap.h
===================================================================
--- linux-2.6.orig/include/linux/pagemap.h	2008-06-11 23:36:07.000000000 +1000
+++ linux-2.6/include/linux/pagemap.h	2008-06-11 23:36:18.000000000 +1000
@@ -165,7 +165,7 @@ static inline int page_cache_get_specula
 		return 0;
 	}
 #endif
-	VM_BUG_ON(PageCompound(page) && (struct page *)page_private(page) != page);
+	VM_BUG_ON(PageTail(page));
 
 	return 1;
 }

  reply	other threads:[~2008-06-11 13:44 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10  5:31 2.6.26-rc5-mm2 Andrew Morton
2008-06-10  6:12 ` 2.6.26-rc5-mm2 Nick Piggin
2008-06-10  7:28 ` 2.6.26-rc5-mm2 Nick Piggin
2008-06-10  8:34   ` 2.6.26-rc5-mm2 Andrew Morton
2008-06-10  8:48     ` 2.6.26-rc5-mm2 Nick Piggin
2008-06-10  9:15       ` 2.6.26-rc5-mm2 Andrew Morton
2008-06-10 12:34         ` 2.6.26-rc5-mm2 Rik van Riel
2008-06-11 18:09       ` 2.6.26-rc5-mm2 Rik van Riel
2008-06-11 23:58         ` 2.6.26-rc5-mm2 Nick Piggin
2008-06-12 19:29           ` 2.6.26-rc5-mm2 Rik van Riel
2008-06-12 21:15             ` 2.6.26-rc5-mm2 (swap_state.c:77) Hugh Dickins
2008-06-13 17:45               ` Rik van Riel
2008-06-13 21:15                 ` Hugh Dickins
2008-06-13 22:03                   ` Rik van Riel
2008-06-10 15:34   ` 2.6.26-rc5-mm2 Lee Schermerhorn
2008-06-10 16:50     ` 2.6.26-rc5-mm2 Hugh Dickins
2008-06-10 10:20 ` 2.6.26-rc5-mm2 lockup up on Intel G33+ICH9R+Core2Duo, -mm1 okay Grant Coady
2008-06-10 18:18   ` Andrew Morton
2008-06-10 21:48     ` Grant Coady
2008-06-10 11:50 ` 2.6.26-rc5-mm2 compile error in vmscan.c Helge Hafting
2008-06-10 12:23   ` Johannes Weiner
2008-06-10 18:37   ` Andrew Morton
2008-06-12  8:13     ` Helge Hafting
2008-06-11  2:26 ` 2.6.26-rc5-mm2 (compile error in mm/memory_hotplug.c) Yasunori Goto
2008-06-11  6:00 ` 2.6.26-rc5-mm2: OOM with 1G free swap Alexey Dobriyan
2008-06-11  6:11   ` Nick Piggin
2008-06-11  6:15   ` Nick Piggin
2008-06-11  6:27   ` Andrew Morton
2008-06-11  6:31     ` Nick Piggin
2008-06-11  6:36     ` KOSAKI Motohiro
2008-06-11  7:31       ` Frederik Deweerdt
2008-06-11 12:57     ` Rik van Riel
2008-06-11 13:44       ` Nick Piggin [this message]
2008-06-11 17:56 ` [BUG] 2.6.26-rc5-mm2 - kernel BUG at arch/x86/kernel/setup.c:388! Kamalesh Babulal
2008-06-11 18:28   ` Dave Hansen
2008-06-11 18:37     ` Vegard Nossum
2008-06-12  6:55       ` Kamalesh Babulal

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=200806112344.17627.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    /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