linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@redhat.com>
To: Joel Fernandes <agnel.joel@gmail.com>
Cc: Josef Bacik <josef@redhat.com>,
	linux-fsdevel@vger.kernel.org,
	kernelnewbies <kernelnewbies@nl.linux.org>
Subject: Re: ext3 writing of data before metadata in ordered mode
Date: Mon, 26 Oct 2009 13:58:32 -0400	[thread overview]
Message-ID: <20091026175831.GD20565@localhost.localdomain> (raw)
In-Reply-To: <9ff7a3bc0910261021k5d9bd5e2r69fd64bfbf882da2@mail.gmail.com>

On Mon, Oct 26, 2009 at 10:21:52AM -0700, Joel Fernandes wrote:
> Hi Josef, Your analysis makes perfect sense. Thank you so much.
> 
> Another question, what could explain the slowness in data=ordered
> mode? I believe everything is asynchronous right? various lists are
> maintained, and kjournald keeps checking theses lists and flushing
> data before metadata written and marked dirty as you said. Is the
> slowness because the flushing of data is done earlier than required
> unlike when done by pdflush which waits for a certain amount of time?
> 

I'm not sure what slowness you are talking about, but I will assume you mean the
slowness of committing a transaction.  Basically everything that has happened
since the last journal commit must be taken care of.  So all data that has been
written needs to be written out synchronously, and then its metadata written to
the journal, and then we can let things start going again while the metadata is
written to where its supposed to asynchronously.  The key part of that is _all_
data needs to be written out.  This is slow compared to Ext4 because with Ext4
we have delayed allocation, so even though we may have dirtied alot of pages
since the last transaction has occured, they may not have been allocated yet, so
no metadata has been changed yet, so we don't have to force the flushing of the
data out to disk, so the journal commit takes much less time because there is
much less work to do.  I hope that answers your question.  Thanks,

Josef

      reply	other threads:[~2009-10-26 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-25 21:33 ext3 writing of data before metadata in ordered mode Joel Fernandes
2009-10-26  4:40 ` Mulyadi Santosa
2009-10-26  7:17   ` Joel Fernandes
2009-10-26 13:19 ` Josef Bacik
2009-10-26 17:21   ` Joel Fernandes
2009-10-26 17:58     ` Josef Bacik [this message]

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=20091026175831.GD20565@localhost.localdomain \
    --to=josef@redhat.com \
    --cc=agnel.joel@gmail.com \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).