Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761077AbZFINga (ORCPT ); Tue, 9 Jun 2009 09:36:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759994AbZFINgJ (ORCPT ); Tue, 9 Jun 2009 09:36:09 -0400 Received: from mail-gx0-f214.google.com ([209.85.217.214]:53115 "EHLO mail-gx0-f214.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759152AbZFINgH (ORCPT ); Tue, 9 Jun 2009 09:36:07 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=L1/1fcShrLuY5IeUEHAADI6CayIKWfNedskOUNZ1mkldJYdf0pneQ8chEH5vqANNA5 aCAP0QqP/y0oSEdGMBrjSaZfFBFaiLrSg8WR+IUZIuf8VRRJXCQTProoqHZnJt0oTWyT WqLCydOzUW5Dz7ohI5PJstIe0KAeo3kPkZzmE= MIME-Version: 1.0 In-Reply-To: <20090609124755.GA6583@localhost> References: <20090528145021.GA5503@localhost> <20090607160225.GA24315@localhost> <20090608123133.GA7944@localhost> <20090609064855.GB5490@localhost> <20090609104825.GJ14820@wotan.suse.de> <20090609121510.GB5589@localhost> <20090609121722.GC9158@wotan.suse.de> <20090609124755.GA6583@localhost> Date: Tue, 9 Jun 2009 21:36:09 +0800 Message-ID: Subject: Re: [PATCH] [13/16] HWPOISON: The high level memory error handler in the VM v3 From: Nai Xia To: Wu Fengguang Cc: Nick Piggin , 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" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1919 Lines: 45 On Tue, Jun 9, 2009 at 8:47 PM, Wu Fengguang wrote: > On Tue, Jun 09, 2009 at 08:17:22PM +0800, Nick Piggin wrote: >> On Tue, Jun 09, 2009 at 08:15:10PM +0800, Wu Fengguang wrote: >> > On Tue, Jun 09, 2009 at 06:48:25PM +0800, Nick Piggin wrote: >> > > On Tue, Jun 09, 2009 at 02:48:55PM +0800, Wu Fengguang wrote: >> > > > On Mon, Jun 08, 2009 at 10:46:53PM +0800, Nai Xia wrote: >> > > > > I meant PG_writeback stops writers to index---->struct page mapping. >> > > > >> > > > It's protected by the radix tree RCU locks. Period. >> > > > >> > > > If you are referring to the reverse mapping: page->mapping is procted >> > > > by PG_lock. No one should make assumption that it won't change under >> > > > page writeback. >> > > >> > > Well... I think probably PG_writeback should be enough. Phrased another >> > > way: I think it is a very bad idea to truncate PG_writeback pages out of >> > > pagecache. Does anything actually do that? >> > >> > There shall be no one. OK I will follow that convention.. >> > >> > But as I stated it is only safe do rely on the fact "no one truncates >> > PG_writeback pages" in end_writeback_io handlers. And I suspect if >> > there does exist such a handler, it could be trivially converted to >> > take the page lock. >> >> Well, the writeback submitter first sets writeback, then unlocks >> the page. I don't think he wants a truncate coming in at that point. > > OK. I think we've mostly agreed on the consequences of PG_writeback vs > truncation. I'll follow the least surprise principle and stop here, hehe. And thank you both for your time & patience, :-) Best Regards, Nai Xia > > Thanks, > Fengguang > -- 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/