[PATCH] mm: balance dirty pages
Now that we can detect writers of shared mappings, throttle them. Avoids OOM by surprise. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
d08b3851da
commit
edc79b2a46
@ -49,6 +49,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/delayacct.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/writeback.h>
|
||||
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/uaccess.h>
|
||||
@ -1571,7 +1572,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;
|
||||
@ -2218,7 +2219,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;
|
||||
|
Reference in New Issue
Block a user