public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: tytso@valinux.com
Cc: alan@lxorguk.ukuu.org.uk, sflory@valinux.com, chip@valinux.com,
	linux-kernel@vger.kernel.org, sct@redhat.com
Subject: Re: mke2fs and kernel VM issues
Date: Mon, 19 Feb 2001 16:06:07 +0100	[thread overview]
Message-ID: <20010219160607.C5170@athlon.random> (raw)
In-Reply-To: <E14ThUy-0002ed-00@the-village.bc.nu> <E14TkFk-0007Nz-00@beefcake.hdqt.valinux.com>
In-Reply-To: <E14TkFk-0007Nz-00@beefcake.hdqt.valinux.com>; from tytso@valinux.com on Fri, Feb 16, 2001 at 04:44:48AM -0800

On Fri, Feb 16, 2001 at 04:44:48AM -0800, Theodore Y. Ts'o wrote:
> Note that this only shows up when using mke2fs to create very large
> filesystems, and you have relatively little memory.  In this particular

If you can reproduce the oom of mke2fs on recent 2.2.19pre, could you try
again after applying this additional VM patch?

--- VM-locked/fs/buffer.c.~1~	Sun Feb 18 04:01:32 2001
+++ VM-locked/fs/buffer.c	Sun Feb 18 23:03:32 2001
@@ -1530,9 +1530,13 @@
 		struct buffer_head *p = tmp;
 		tmp = tmp->b_this_page;
 
-		if (buffer_dirty(p))
-			if (test_and_set_bit(BH_Wait_IO, &p->b_state))
-				ll_rw_block(WRITE, 1, &p);
+		if (buffer_dirty(p) || buffer_locked(p))
+			if (test_and_set_bit(BH_Wait_IO, &p->b_state)) {
+				if (buffer_dirty(p))
+					ll_rw_block(WRITE, 1, &p);
+				else if (buffer_locked(p))
+					wait_on_buffer(p);
+			}
 	} while (tmp != bh);
 
 	/* Restore the visibility of the page before returning. */
--- VM-locked/include/linux/fs.h.~1~	Sun Feb 18 04:01:32 2001
+++ VM-locked/include/linux/fs.h	Sun Feb 18 22:59:00 2001
@@ -810,7 +810,6 @@
 	if (test_and_clear_bit(BH_Dirty, &bh->b_state)) {
 		if (bh->b_list == BUF_DIRTY)
 			refile_buffer(bh);
-		clear_bit(BH_Wait_IO, &bh->b_state);
 	}
 }
 
--- VM-locked/include/linux/locks.h.~1~	Sun Feb 18 06:31:15 2001
+++ VM-locked/include/linux/locks.h	Sun Feb 18 22:59:09 2001
@@ -29,6 +29,7 @@
 extern inline void unlock_buffer(struct buffer_head *bh)
 {
 	clear_bit(BH_Lock, &bh->b_state);
+	clear_bit(BH_Wait_IO, &bh->b_state);
 	wake_up(&bh->b_wait);
 }
 
Andrea

  parent reply	other threads:[~2001-02-19 15:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-16  0:38 [OTP] SMP board recommendations? David D.W. Downey
2001-02-16  1:43 ` mke2fs and kernel VM issues Samuel Flory
2001-02-16  9:48   ` Alan Cox
2001-02-16 12:44     ` tytso
2001-02-16 12:49       ` Alan Cox
2001-02-19 15:06       ` Andrea Arcangeli [this message]
2001-02-16 19:01     ` Samuel Flory
2001-02-16 11:05   ` Tigran Aivazian
2001-02-16 19:01     ` Samuel Flory
2001-02-16  5:03 ` [OTP] SMP board recommendations? David D.W. Downey
2001-02-16  6:27   ` Andre Hedrick
2001-02-16 10:49 ` Roeland Th. Jansen

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=20010219160607.C5170@athlon.random \
    --to=andrea@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=chip@valinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sct@redhat.com \
    --cc=sflory@valinux.com \
    --cc=tytso@valinux.com \
    /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