Messages in this thread Patch in this message |  | | Subject | [PATCH 7/9] Add balance_dirty_pages_ratelimited() to cont_expand_zero() | From | OGAWA Hirofumi <> | Date | Mon, 21 Apr 2008 03:13:28 +0900 |
| |
On the systems, ftruncate() which expand size for FAT became the cause of OOM. The cont_expand_zero() filled all memory with dirty pages, and since disk is very slow, limit of page scanning was exceeded, then it triggered OOM.
This adds balance_dirty_pages_ratelimited() to avoid filling memory with dirty pages.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ---
fs/buffer.c | 2 ++ 1 file changed, 2 insertions(+)
diff -puN fs/buffer.c~cont_expand_zero-fix fs/buffer.c --- linux-2.6/fs/buffer.c~cont_expand_zero-fix 2008-04-05 18:22:57.000000000 +0900 +++ linux-2.6-hirofumi/fs/buffer.c 2008-04-05 18:22:57.000000000 +0900 @@ -2251,6 +2251,8 @@ int cont_expand_zero(struct file *file, goto out; BUG_ON(err != len); err = 0; + + balance_dirty_pages_ratelimited(mapping); } /* page covers the boundary, find the boundary offset */ _
|  |