* writepage @ 2004-03-01 20:27 Anand Eswaran 2004-03-01 20:33 ` writepage Raghu R. Arur 0 siblings, 1 reply; 5+ messages in thread From: Anand Eswaran @ 2004-03-01 20:27 UTC (permalink / raw) To: linux-mm 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: writepage 2004-03-01 20:27 writepage Anand Eswaran @ 2004-03-01 20:33 ` Raghu R. Arur 2004-03-01 20:59 ` writepage Anand Eswaran 0 siblings, 1 reply; 5+ messages in thread From: Raghu R. Arur @ 2004-03-01 20:33 UTC (permalink / raw) To: Anand Eswaran; +Cc: linux-mm 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> > -- 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: writepage 2004-03-01 20:33 ` writepage Raghu R. Arur @ 2004-03-01 20:59 ` Anand Eswaran 2004-03-01 21:05 ` writepage Anand Eswaran 0 siblings, 1 reply; 5+ messages in thread From: Anand Eswaran @ 2004-03-01 20:59 UTC (permalink / raw) To: Raghu R. Arur; +Cc: linux-mm 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> > > > > > -- 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: writepage 2004-03-01 20:59 ` writepage Anand Eswaran @ 2004-03-01 21:05 ` Anand Eswaran 2004-03-01 21:10 ` writepage Raghu R. Arur 0 siblings, 1 reply; 5+ messages in thread From: Anand Eswaran @ 2004-03-01 21:05 UTC (permalink / raw) To: Raghu R. Arur; +Cc: linux-mm 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> > > > > > > > > > > -- > 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> > > -- 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: writepage 2004-03-01 21:05 ` writepage Anand Eswaran @ 2004-03-01 21:10 ` Raghu R. Arur 0 siblings, 0 replies; 5+ messages in thread From: Raghu R. Arur @ 2004-03-01 21:10 UTC (permalink / raw) To: Anand Eswaran; +Cc: linux-mm 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> > > > > > > > > > > > > > > > -- > > 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> > > > > > -- 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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-03-01 21:10 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-03-01 20:27 writepage Anand Eswaran 2004-03-01 20:33 ` writepage Raghu R. Arur 2004-03-01 20:59 ` writepage Anand Eswaran 2004-03-01 21:05 ` writepage Anand Eswaran 2004-03-01 21:10 ` writepage Raghu R. Arur
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox