[patch 4/7] mm: cpuset aware reclaim writeout

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Rientjes
Date: Tuesday, October 28, 2008 - 9:08 am

From: Christoph Lameter <cl@linux-foundation.org>

During direct reclaim we traverse down a zonelist and are carefully
checking each zone if it's a member of the active cpuset.  But then we
call pdflush without enforcing the same restrictions.  In a larger system
this may have the effect of a massive amount of pages being dirtied and
then either

 - no writeout occurs because global dirty limits have not been reached,
   or

 - writeout starts randomly for some dirty inode in the system.  pdflush
   may just write out data for nodes in another cpuset and miss doing
   proper dirty handling for the current cpuset.

In both cases, dirty pages in the zones of interest may not be affected
and writeout may not occur as necessary.

Fix that by restricting pdflush to the active cpuset.  Writeout will occur
from direct reclaim the same way as without a cpuset.

Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Menage <menage@google.com>
Cc: Derek Fults <dfults@sgi.com>
Signed-off-by: David Rientjes <rientjes@google.com>
---
 mm/vmscan.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1604,7 +1604,8 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
 		 */
 		if (total_scanned > sc->swap_cluster_max +
 					sc->swap_cluster_max / 2) {
-			wakeup_pdflush(laptop_mode ? 0 : total_scanned, NULL);
+			wakeup_pdflush(laptop_mode ? 0 : total_scanned,
+				       &cpuset_current_mems_allowed);
 			sc->may_writepage = 1;
 		}
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/7] cpusets: add dirty map to struct address_space, David Rientjes, (Tue Oct 28, 9:08 am)
[patch 4/7] mm: cpuset aware reclaim writeout, David Rientjes, (Tue Oct 28, 9:08 am)
[patch 5/7] mm: throttle writeout with cpuset awareness, David Rientjes, (Tue Oct 28, 9:08 am)
[patch 6/7] cpusets: per cpuset dirty ratios, David Rientjes, (Tue Oct 28, 9:08 am)
Re: [patch 6/7] cpusets: per cpuset dirty ratios, Paul Menage, (Wed Oct 29, 11:59 pm)
Re: [patch 6/7] cpusets: per cpuset dirty ratios, Peter Zijlstra, (Thu Oct 30, 1:44 am)
Re: [patch 6/7] cpusets: per cpuset dirty ratios, David Rientjes, (Thu Oct 30, 1:48 am)
Re: [patch 6/7] cpusets: per cpuset dirty ratios, David Rientjes, (Thu Oct 30, 2:03 am)
Re: [patch 6/7] cpusets: per cpuset dirty ratios, Peter Zijlstra, (Thu Oct 30, 2:34 am)
Re: [patch 6/7] cpusets: per cpuset dirty ratios, David Rientjes, (Thu Oct 30, 3:02 am)
Re: [patch 6/7] cpusets: per cpuset dirty ratios, Christoph Lameter, (Thu Oct 30, 8:28 am)
Re: [patch 7/7] cpusets: update documentation for writebac ..., Christoph Lameter, (Thu Oct 30, 9:06 am)