Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757327AbZFBOOY (ORCPT ); Tue, 2 Jun 2009 10:14:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752898AbZFBOOQ (ORCPT ); Tue, 2 Jun 2009 10:14:16 -0400 Received: from cantor.suse.de ([195.135.220.2]:50287 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbZFBOOQ (ORCPT ); Tue, 2 Jun 2009 10:14:16 -0400 Date: Tue, 2 Jun 2009 16:14:16 +0200 From: Nick Piggin To: Wu Fengguang Cc: Andi Kleen , "hugh@veritas.com" , "riel@redhat.com" , "akpm@linux-foundation.org" , "chris.mason@oracle.com" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH] [13/16] HWPOISON: The high level memory error handler in the VM v3 Message-ID: <20090602141416.GC26982@wotan.suse.de> References: <20090528122357.GM6920@wotan.suse.de> <20090528135428.GB16528@localhost> <20090601115046.GE5018@wotan.suse.de> <20090601183225.GS1065@one.firstfloor.org> <20090602120042.GB1392@wotan.suse.de> <20090602124757.GG1065@one.firstfloor.org> <20090602125713.GG1392@wotan.suse.de> <20090602134659.GA21338@localhost> <20090602140830.GR1065@one.firstfloor.org> <20090602141031.GC21338@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090602141031.GC21338@localhost> User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2071 Lines: 59 On Tue, Jun 02, 2009 at 10:10:31PM +0800, Wu Fengguang wrote: > 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. I prefer mine because I don't want truncate_complete_page escaping mm/truncate.c because the caller has to deal with truncate races. > --- > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/