mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, hirofumi@mail.parknet.co.jp
Subject: [PATCH 7/9] Add balance_dirty_pages_ratelimited() to cont_expand_zero()
Date: Mon, 21 Apr 2008 03:13:28 +0900	[thread overview]
Message-ID: <cef36f873e8480b87c875695.ps@mail.parknet.co.jp> (raw)
In-Reply-To: <dedb5bd83e8480b87c765695.ps@mail.parknet.co.jp>


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

  reply	other threads:[~2008-04-20 18:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-20 18:13 [PATCH 1/9] fat: kill is_bad_inode() check OGAWA Hirofumi
2008-04-20 18:13 ` [PATCH 2/9] fat: fat_notify_change() and check_mode() cleanup OGAWA Hirofumi
2008-04-20 18:13   ` [PATCH 3/9] fat: fat_setattr() fix OGAWA Hirofumi
2008-04-20 18:13     ` [PATCH 4/9] fat: Add allow_utime option OGAWA Hirofumi
2008-04-20 18:13       ` [PATCH 5/9] fat: Update free_clusters even if it is untrusted OGAWA Hirofumi
2008-04-20 18:13         ` [PATCH 6/9] fat: Remove fat_clusters_flush() OGAWA Hirofumi
2008-04-20 18:13           ` OGAWA Hirofumi [this message]
2008-04-20 18:13             ` [PATCH 8/9] vfat: bug fix for vfat cannot handle filename with 255 OGAWA Hirofumi
2008-04-20 18:13               ` [PATCH 9/9] fat: use __getname() OGAWA Hirofumi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cef36f873e8480b87c875695.ps@mail.parknet.co.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®