All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Lucas Nussbaum <lucas.nussbaum@loria.fr>
Cc: linux-ext4@vger.kernel.org,
	Emmanuel Jeanvoine <emmanuel.jeanvoine@inria.fr>
Subject: [PATCH, RFC] jbd2: don't write non-commit blocks synchronously
Date: Thu, 6 Mar 2014 08:56:42 -0500	[thread overview]
Message-ID: <20140306135642.GA22136@thunk.org> (raw)
In-Reply-To: <20140305141343.GA26225@xanadu.blop.info>

On Wed, Mar 05, 2014 at 03:13:43PM +0100, Lucas Nussbaum wrote:
> TL;DR: we experience long temporary hangs when doing multiple mount -o
> remount at the same time as other I/O on an ext4 filesystem.

Hi Lukas,

Thanks for this report.  Are you willing to try a kernel patch?  If
so, could you try and see if this fixes your issue.  From looking at
your block trace, I saw a large number of suspicious 4k writes from
the jbd2 layer.

					- Ted

commit 137d7cea675fd7d8ff98b7e035fb6516dc4ab220
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Thu Mar 6 08:56:11 2014 -0500

    jbd2: don't write non-commit blocks synchronously
    
    We don't need to write the revoke blocks and descriptor blocks using
    WRITE_SYNC, since when we issue the commit block, thos blocks will get
    pushed out via REQ_FLUSH.  This will allow the journal blocks to be
    written in fewer i/o operations (otherwise we end up issuing a whole
    series of 4k writes unnecessarily).
    
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index cf2fc05..fb64629 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -554,7 +554,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
 
 	blk_start_plug(&plug);
 	jbd2_journal_write_revoke_records(journal, commit_transaction,
-					  &log_bufs, WRITE_SYNC);
+					  &log_bufs, WRITE);
 	blk_finish_plug(&plug);
 
 	jbd_debug(3, "JBD2: commit phase 2b\n");
@@ -739,7 +739,7 @@ start_journal_io:
 				clear_buffer_dirty(bh);
 				set_buffer_uptodate(bh);
 				bh->b_end_io = journal_end_buffer_io_sync;
-				submit_bh(WRITE_SYNC, bh);
+				submit_bh(WRITE, bh);
 			}
 			cond_resched();
 			stats.run.rs_blocks_logged += bufs;


  reply	other threads:[~2014-03-06 13:56 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 14:13 Extremely slow remounts with concurrent I/O Lucas Nussbaum
2014-03-06 13:56 ` Theodore Ts'o [this message]
2014-03-06 17:28   ` [PATCH, RFC] jbd2: don't write non-commit blocks synchronously Lucas Nussbaum
2014-03-06 18:27     ` Theodore Ts'o
2014-03-06 18:45       ` Lucas Nussbaum
2014-03-06 18:37     ` Lucas Nussbaum
2014-03-08 16:08 ` [PATCH, RFC] fs: only call sync_filesystem() when remounting read-only Theodore Ts'o
2014-03-08 16:08 ` Theodore Ts'o
2014-03-10 11:45   ` Lucas Nussbaum
2014-03-10 14:41     ` Theodore Ts'o
2014-03-10 12:15   ` Lucas Nussbaum
2014-03-13  0:36   ` Dave Chinner
2014-03-13  1:16     ` Theodore Ts'o
2014-03-13  3:14       ` Theodore Ts'o
2014-03-13  6:04         ` Dave Chinner
2014-03-13 12:55           ` Theodore Ts'o
2014-03-13  7:39     ` Christoph Hellwig
2014-03-13 14:20       ` [Cluster-devel] [PATCH] fs: push sync_filesystem() down to the file system's remount_fs() Theodore Ts'o
2014-03-13 14:22         ` [Ocfs2-devel] " Theodore Ts'o
2014-03-13 14:20         ` Theodore Ts'o
2014-03-13 14:20         ` Theodore Ts'o
2014-03-13 14:20         ` Theodore Ts'o
2014-03-13 14:20         ` Theodore Ts'o
2014-03-13 14:50         ` Anders Larsen
2014-03-13 16:23         ` [Cluster-devel] " Jan Kara
2014-03-13 16:23           ` [Ocfs2-devel] " Jan Kara
2014-03-13 16:23           ` Jan Kara
2014-03-13 16:23           ` Jan Kara
2014-03-13 16:23           ` Jan Kara
2014-03-13 16:23           ` Jan Kara
2014-03-13 16:28           ` [Cluster-devel] " Steven Whitehouse
2014-03-13 16:28             ` [Ocfs2-devel] " Steven Whitehouse
2014-03-13 16:28             ` Steven Whitehouse
2014-03-13 16:28             ` Steven Whitehouse
2014-03-13 16:28             ` Steven Whitehouse
2014-03-13 16:28             ` Steven Whitehouse
2014-03-13 16:28             ` [Cluster-devel] " Steven Whitehouse
2014-03-13 16:28             ` Steven Whitehouse
2014-03-13 23:15             ` [Cluster-devel] " Theodore Ts'o
2014-03-13 23:15               ` [Ocfs2-devel] " Theodore Ts'o
2014-03-13 23:15               ` Theodore Ts'o
2014-03-13 23:15               ` Theodore Ts'o
2014-03-13 23:15               ` Theodore Ts'o
2014-03-13 23:15               ` Theodore Ts'o
2014-03-14 12:13               ` Jan Kara
2014-03-14 12:13                 ` [Ocfs2-devel] " Jan Kara
2014-03-14 12:13                 ` Jan Kara
2014-03-14 12:13                 ` Jan Kara
2014-03-14 12:13                 ` Jan Kara
2014-03-14 12:13                 ` Jan Kara
2014-03-14  0:33         ` Steve French
2014-03-14  0:33           ` [Ocfs2-devel] " Steve French
2014-03-14  0:33           ` Steve French
2014-03-14  0:33           ` Steve French
2014-03-14  0:33           ` Steve French
2014-03-14  0:33           ` Steve French
2014-03-14  1:23           ` [Cluster-devel] " Theodore Ts'o
2014-03-14  1:23             ` [Ocfs2-devel] " Theodore Ts'o
2014-03-14  1:23             ` Theodore Ts'o
2014-03-14  1:23             ` Theodore Ts'o
2014-03-14  1:23             ` Theodore Ts'o
2014-03-14  1:23             ` Theodore Ts'o
2014-03-13  7:19 ` Extremely slow remounts with concurrent I/O Dave Chinner

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=20140306135642.GA22136@thunk.org \
    --to=tytso@mit.edu \
    --cc=emmanuel.jeanvoine@inria.fr \
    --cc=linux-ext4@vger.kernel.org \
    --cc=lucas.nussbaum@loria.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.