lkml.org 
[lkml]   [2008]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 7/9] Add balance_dirty_pages_ratelimited() to cont_expand_zero()
From
Date

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 */
_

\
 
 \ /
  Last update: 2008-04-20 20:27    [W:0.048 / U:3.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site