[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090602141031.GC21338@localhost>
Date: Tue, 2 Jun 2009 22:10:31 +0800
From: Wu Fengguang <fengguang.wu@...el.com>
To: Andi Kleen <andi@...stfloor.org>
Cc: Nick Piggin <npiggin@...e.de>,
"hugh@...itas.com" <hugh@...itas.com>,
"riel@...hat.com" <riel@...hat.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"chris.mason@...cle.com" <chris.mason@...cle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH] [13/16] HWPOISON: The high level memory error handler
in the VM v3
On Tue, Jun 02, 2009 at 10:08:30PM +0800, Andi Kleen wrote:
> > > > We could probably call truncate_complete_page(), but then
> > > > we would also need to duplicate most of the checking outside
> > > > the function anyways and there wouldn't be any possibility
> > > > to share the clean/dirty variants. If you insist I can
> > > > do it, but I think it would be significantly worse code
> > > > than before and I'm reluctant to do that.
> > >
> > > I can write you the patch for that too if you like.
> >
> > I have already posted one on truncate_complete_page(). Not the way you want it?
>
> Sorry I must have missed it (too much mail I guess). Can you repost please?
OK, here it is, a more simplified one.
---
mm/memory-failure.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
--- sound-2.6.orig/mm/memory-failure.c
+++ sound-2.6/mm/memory-failure.c
@@ -324,23 +324,16 @@ static int me_free(struct page *p)
*/
static int me_pagecache_clean(struct page *p)
{
+ if (page_mapping(p))
+ truncate_complete_page(p->mapping, p);
+
if (!isolate_lru_page(p))
page_cache_release(p);
- if (page_has_private(p))
- do_invalidatepage(p, 0);
if (page_has_private(p) && !try_to_release_page(p, GFP_NOIO))
Dprintk(KERN_ERR "MCE %#lx: failed to release buffers\n",
page_to_pfn(p));
- /*
- * remove_from_page_cache assumes (mapping && !mapped)
- */
- if (page_mapping(p) && !page_mapped(p)) {
- remove_from_page_cache(p);
- page_cache_release(p);
- }
-
return RECOVERED;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists