The patch titled throttle writers of shared mappings has been removed from the -mm tree. Its filename is throttle-writers-of-shared-mappings.patch This patch was probably dropped from -mm because it has now been merged into a subsystem tree or into Linus's tree, or because it was folded into its parent patch in the -mm tree. ------------------------------------------------------ Subject: throttle writers of shared mappings From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Now that we can detect writers of shared mappings, throttle them. Avoids OOM by surprise. Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx> Cc: Hugh Dickins <hugh@xxxxxxxxxxx> Cc: Christoph Lameter <clameter@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/writeback.h | 1 + mm/memory.c | 5 +++-- mm/page-writeback.c | 10 ++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff -puN mm/memory.c~throttle-writers-of-shared-mappings mm/memory.c --- devel/mm/memory.c~throttle-writers-of-shared-mappings 2006-05-22 13:11:16.000000000 -0700 +++ devel-akpm/mm/memory.c 2006-05-22 13:11:20.000000000 -0700 @@ -49,6 +49,7 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/backing-dev.h> +#include <linux/writeback.h> #include <asm/pgalloc.h> #include <asm/uaccess.h> @@ -2163,7 +2164,7 @@ retry: unlock: pte_unmap_unlock(page_table, ptl); if (dirty_page) { - set_page_dirty(dirty_page); + set_page_dirty_balance(dirty_page); put_page(dirty_page); } return ret; @@ -2284,7 +2285,7 @@ static inline int handle_pte_fault(struc unlock: pte_unmap_unlock(pte, ptl); if (dirty_page) { - set_page_dirty(dirty_page); + set_page_dirty_balance(dirty_page); put_page(dirty_page); } return VM_FAULT_MINOR; diff -puN include/linux/writeback.h~throttle-writers-of-shared-mappings include/linux/writeback.h --- devel/include/linux/writeback.h~throttle-writers-of-shared-mappings 2006-05-22 13:11:20.000000000 -0700 +++ devel-akpm/include/linux/writeback.h 2006-05-22 13:11:20.000000000 -0700 @@ -115,6 +115,7 @@ int sync_page_range(struct inode *inode, loff_t pos, loff_t count); int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, loff_t pos, loff_t count); +void set_page_dirty_balance(struct page *page); /* pdflush.c */ extern int nr_pdflush_threads; /* Global so it can be exported to sysctl diff -puN mm/page-writeback.c~throttle-writers-of-shared-mappings mm/page-writeback.c --- devel/mm/page-writeback.c~throttle-writers-of-shared-mappings 2006-05-22 13:11:20.000000000 -0700 +++ devel-akpm/mm/page-writeback.c 2006-05-22 13:11:20.000000000 -0700 @@ -256,6 +256,16 @@ static void balance_dirty_pages(struct a pdflush_operation(background_writeout, 0); } +void set_page_dirty_balance(struct page *page) +{ + if (set_page_dirty(page)) { + struct address_space *mapping = page_mapping(page); + + if (mapping) + balance_dirty_pages_ratelimited(mapping); + } +} + /** * balance_dirty_pages_ratelimited_nr - balance dirty memory state * @mapping: address_space which was dirtied _ Patches currently in -mm which might be from a.p.zijlstra@xxxxxxxxx are buglet-in-radix_tree_tag_set.patch throttle-writers-of-shared-mappings.patch optimize-follow_pages.patch swap-prefetch-fix-lru_cache_add_tail.patch swap-prefetch-fix-lru_cache_add_tail-tidy.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html