From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 13 Apr 2005 11:30:17 +0900 From: IWAMOTO Toshihiro Subject: Re: question on page-migration code In-Reply-To: <425B600E.6020701@engr.sgi.com> References: <4255B13E.8080809@engr.sgi.com> <20050407180858.GB19449@logos.cnet> <425AC268.4090704@engr.sgi.com> <20050412.084143.41655902.taka@valinux.co.jp> <425B600E.6020701@engr.sgi.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Message-Id: <20050413023022.B834A70464@sv1.valinux.co.jp> Sender: owner-linux-mm@kvack.org Return-Path: To: Ray Bryant Cc: Hirokazu Takahashi , marcelo.tosatti@cyclades.com, haveblue@us.ibm.com, linux-mm@kvack.org List-ID: At Tue, 12 Apr 2005 00:43:42 -0500, Ray Bryant wrote: > What appears to be happening is the following: > > dirty pte bits are being swept into the page dirty bit as a side effect > of migration. That is, if a page had pte_dirty(pte) set, then after > migration, it will have PageDirty(page) = true. > > Only pages with PageDirty() set will be written to swap as part of the > process of trying to clear PG_private. So, when I do the first migration, > the PG_dirty bit is not set on the page, but the dirty bit is set in the > pte. Because PG_dirty is not set, the page does not get written to swap, > and the migration is fast. However, at the end of the migration process, > the pages all have PG_dirty set and the pte dirty bits are cleared. When I wrote the migration code long ago, I didn't think about such side effects and just followed the kswapd operation. > I guess it seems to me that if a page has pte dirty set, but doesn't have > PG_dirty set, then that state should be carried over to the newpage after > a migration, rather than sweeping the pte dirty bit into the PG_dirty bit. I think this is the correct solution. -- 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