From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 1 Mar 2004 16:10:52 -0500 (EST) From: "Raghu R. Arur" Subject: Re: writepage In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Anand Eswaran Cc: linux-mm@kvack.org List-ID: Yes a page that is in swap cache and on which a rw_swap_page() is done, will have both buffers and mapping NON_NULL.. On Mon, 1 Mar 2004, Anand Eswaran wrote: > > Sorry I meant for a given page , during the next pass, when the > page->buffers is NON_NULL and is released, by definition the page cannot > have a null mapping because it would have been added in the swapcache > previous pass. Is that true? > > Thanks, > ---- > Anand. > > On Mon, 1 Mar 2004, Anand Eswaran wrote: > > > In that case, it seems to me that during the next pass of the launder > > loop, the loop by definition cannot have a (page->mapping) value of NULL > > because it has been added to the swapcache in the previous pass. > > > > Is that true? > > ----- > > Anand. > > > > > > > > On Mon, 1 Mar 2004, Raghu R. Arur wrote: > > > > > > > > The page is added to the swap cache by add_to_swap_cache and not by > > > writepage. > > > > > > writepage() (swap_writepage() in this case) prepares the page to write to > > > the swap disk by creating buffers and submits the page to the disk. So > > > page->buffers will be NON_NULL. > > > > > > Raghu. > > > > > > On Mon, 1 Mar 2004, Anand Eswaran wrote: > > > > > > > Hi : > > > > > > > > I have quick question reg Linux 2.4.18, Ive tried to understand the code > > > > but am pretty confused: > > > > > > > > In the typical malloc execution-path, the page is added to swap and it's > > > > pte_chain is unmapped after which the writepage() is executed. However I > > > > notice that *after* the writepage(), the page->buffers is NON_NULL. > > > > > > > > Is this supposed to happen? I thought the writepage function flushed the > > > > page to swap, so why are there residual buffers? > > > > > > > > Thanks, > > > > ---- > > > > Anand. > > > > > > > > -- > > > > 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 > > > > > > > > > > > > > > > -- > > 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 > > > > > -- 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