From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 18 Apr 2005 19:37:35 +0900 From: IWAMOTO Toshihiro Subject: Re: question on page-migration code In-Reply-To: <20050415125355.GA19190@logos.cnet> References: <425AC268.4090704@engr.sgi.com> <20050412.084143.41655902.taka@valinux.co.jp> <1113324392.8343.53.camel@localhost> <20050413.194800.74725991.taka@valinux.co.jp> <20050414155734.GE14975@logos.cnet> <20050415064138.4AD8E70471@sv1.valinux.co.jp> <20050415125355.GA19190@logos.cnet> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Message-Id: <20050418103735.2BB3C7046D@sv1.valinux.co.jp> Sender: owner-linux-mm@kvack.org Return-Path: To: Marcelo Tosatti Cc: IWAMOTO Toshihiro , Hirokazu Takahashi , haveblue@us.ibm.com, raybry@engr.sgi.com, linux-mm@kvack.org List-ID: Hi, At Fri, 15 Apr 2005 09:53:55 -0300, Marcelo Tosatti wrote: > On Fri, Apr 15, 2005 at 03:41:38PM +0900, IWAMOTO Toshihiro wrote: > > At Thu, 14 Apr 2005 12:57:34 -0300, > > Marcelo Tosatti wrote: > > > That said, I see no need to reset PG_dirty in case it was not set before > > > migration, as you propose. > > > > I think PG_dirty should be reset, as the side effect is probably > > unacceptable for Ray's application. It would be a bit more > > complicated than just changing page and PTE bits, but I think it's > > doable. > > Yes, makes sense. > > Question: Who is causing the writeouts here? > > Is there memory pressure or is it pdflush? > > Its not the migration code? (that would be a problem I think). If I understand correctly, writebacks happen in the following way. 1. The migration code unmaps dirty PTEs. 2. try_to_unmap() calls set_page_dirty() for such pages, setting PG_dirty and the dirty radix tree tag. 3. When pdflush is woken, it calls do_writepages(). 4. At least for ext2 (I assume it is true for most file systems), do_writepage() calls result in mpage_writepages() calls, which scan radix trees for dirty tags. -- IWAMOTO Toshihiro -- 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/ . Don't email: aart@kvack.org