From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx123.postini.com [74.125.245.123]) by kanga.kvack.org (Postfix) with SMTP id 764406B002C for ; Thu, 1 Mar 2012 14:42:03 -0500 (EST) Date: Thu, 1 Mar 2012 11:42:01 -0800 From: Andrew Morton Subject: Re: [PATCH 5/9] writeback: introduce the pageout work Message-Id: <20120301114201.d1dcacad.akpm@linux-foundation.org> In-Reply-To: <20120301110404.GC4385@quack.suse.cz> References: <20120228140022.614718843@intel.com> <20120228144747.198713792@intel.com> <20120228160403.9c9fa4dc.akpm@linux-foundation.org> <20120301110404.GC4385@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Jan Kara Cc: Fengguang Wu , Greg Thelen , Ying Han , "hannes@cmpxchg.org" , KAMEZAWA Hiroyuki , Rik van Riel , Mel Gorman , Minchan Kim , Linux Memory Management List , LKML On Thu, 1 Mar 2012 12:04:04 +0100 Jan Kara wrote: > > iirc, the way I "grabbed" the page was to actually lock it, with > > [try_]_lock_page(). And unlock it again way over within the writeback > > thread. I forget why I did it this way, rather than get_page() or > > whatever. Locking the page is a good way of preventing anyone else > > from futzing with it. It also pins the inode, which perhaps meant that > > with careful management, I could avoid the igrab()/iput() horrors > > discussed above. > > I think using get_page() might be a good way to go. get_page() doesn't pin the inode - truncate() will still detach it from the address_space(). -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org