public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.6-rc{1,2} bad VM/NFS interaction in case of dirty page writeback
@ 2004-04-27  1:12 Shantanu Goel
  2004-04-27  2:15 ` Andrew Morton
  0 siblings, 1 reply; 19+ messages in thread
From: Shantanu Goel @ 2004-04-27  1:12 UTC (permalink / raw)
  To: Kernel

Hi,

During page reclamation when the scanner encounters a
dirty page and invokes writepage(), if the FS layer
returns WRITEPAGE_ACTIVATE as NFS does, I think the
page should not be placed on the active as is
presently done.  This can cause a lot of extraneous
swapout activity because in the presence of a large
active list, the pages being written out will not be
reclaimed quickly enough.  It also seems counter
intuitive since the scanner has just determined that
the page has not been recently referenced.

Shouldn't the following code from shrink_list():

res = mapping->a_ops->writepage(page, &wbc);
if (res < 0)
	handle_write_error(mapping, page, res);
if (res == WRITEPAGE_ACTIVATE) {
	ClearPageReclaim(page);
	goto activate_locked;
}

read:

res = mapping->a_ops->writepage(page, &wbc);
if (res < 0)
	handle_write_error(mapping, page, res);
if (res == WRITEPAGE_ACTIVATE) {
	ClearPageReclaim(page);
	goto keep_locked;
}

I can observe the benefit of this change if I run a dd
on an NFS mount with the active list full of mostly
mapped pages.  The stock kernel ends up paging out
quite a bit of memory whereas the modified kernel does
not.

Comments?

Thanks,
Shantanu



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2004-04-29  8:46 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-27  1:12 2.6.6-rc{1,2} bad VM/NFS interaction in case of dirty page writeback Shantanu Goel
2004-04-27  2:15 ` Andrew Morton
2004-04-27  3:11   ` Trond Myklebust
2004-04-27  3:59     ` Andrew Morton
2004-04-27  5:23       ` Trond Myklebust
2004-04-27  5:58         ` Andrew Morton
2004-04-27 11:44           ` Shantanu Goel
2004-04-27 15:36           ` Trond Myklebust
2004-04-28  0:47             ` Shantanu Goel
2004-04-28  1:02               ` Andrew Morton
2004-04-28  1:28                 ` Trond Myklebust
2004-04-28  1:38                   ` Andrew Morton
2004-04-28  5:29             ` Christoph Hellwig
2004-04-28 16:17               ` Trond Myklebust
2004-04-28 16:38                 ` Christoph Hellwig
2004-04-28 19:07                   ` Andrew Morton
2004-04-29  1:48                     ` Nathan Scott
2004-04-29  8:27                       ` Christoph Hellwig
2004-04-27  6:10       ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox