The patch titled mm: balance dirty pages has been added to the -mm tree. Its filename is mm-balance-dirty-pages.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: mm: balance dirty pages 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> 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 include/linux/writeback.h~mm-balance-dirty-pages include/linux/writeback.h --- a/include/linux/writeback.h~mm-balance-dirty-pages +++ a/include/linux/writeback.h @@ -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/memory.c~mm-balance-dirty-pages mm/memory.c --- a/mm/memory.c~mm-balance-dirty-pages +++ a/mm/memory.c @@ -48,6 +48,7 @@ #include <linux/rmap.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/writeback.h> #include <asm/pgalloc.h> #include <asm/uaccess.h> @@ -1572,7 +1573,7 @@ gotten: 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; @@ -2216,7 +2217,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; diff -puN mm/page-writeback.c~mm-balance-dirty-pages mm/page-writeback.c --- a/mm/page-writeback.c~mm-balance-dirty-pages +++ a/mm/page-writeback.c @@ -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 add-page_mkwrite-vm_operations-method-fix.patch mm-tracking-shared-dirty-pages.patch mm-balance-dirty-pages.patch mm-msync-cleanup.patch mm-optimize-the-new-mprotect-code-a-bit.patch mm-small-cleanup-of-install_page.patch mm-remove-some-update_mmu_cache-calls.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