Index: linux-2.6.20-rc4/fs/fs-writeback.c =================================================================== --- linux-2.6.20-rc4.orig/fs/fs-writeback.c 2007-01-09 07:05:27.586782149 -0600 +++ linux-2.6.20-rc4/fs/fs-writeback.c 2007-01-09 07:08:20.744542172 -0600 @@ -365,6 +365,11 @@ sync_sb_inodes(struct super_block *sb, s if (current_is_pdflush() && !writeback_acquire(bdi)) break; +#ifdef CONFIG_CPUSETS + if (wbc->nodes && !nodes_intersects(mapping->dirty_nodes, + *wbc->nodes)) + break; +#endif BUG_ON(inode->i_state & I_FREEING); __iget(inode); pages_skipped = wbc->pages_skipped; Index: linux-2.6.20-rc4/include/linux/writeback.h =================================================================== --- linux-2.6.20-rc4.orig/include/linux/writeback.h 2007-01-09 07:05:27.599478575 -0600 +++ linux-2.6.20-rc4/include/linux/writeback.h 2007-01-09 07:08:21.019956942 -0600 @@ -59,11 +59,12 @@ struct writeback_control { unsigned for_reclaim:1; /* Invoked from the page allocator */ unsigned for_writepages:1; /* This is a writepages() call */ unsigned range_cyclic:1; /* range_start is cyclic */ + nodemask_t *nodes; /* Set of nodes of interest */ }; /* * fs/fs-writeback.c - */ + */ void writeback_inodes(struct writeback_control *wbc); void wake_up_inode(struct inode *inode); int inode_wait(void *); Index: linux-2.6.20-rc4/mm/vmscan.c =================================================================== --- linux-2.6.20-rc4.orig/mm/vmscan.c 2007-01-09 07:05:27.542832983 -0600 +++ linux-2.6.20-rc4/mm/vmscan.c 2007-01-09 07:08:20.830487206 -0600 @@ -1065,7 +1065,8 @@ unsigned long try_to_free_pages(struct z */ 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; }