linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Theodore Tso <tytso@mit.edu>
Cc: Andi Kleen <andi@firstfloor.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-btrfs <linux-btrfs@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Btrfs v0.16 released
Date: Sat, 16 Aug 2008 14:10:10 -0400	[thread overview]
Message-ID: <1218910210.19495.25.camel@think.oraclecorp.com> (raw)
In-Reply-To: <1218832622.19495.14.camel@think.oraclecorp.com>

On Fri, 2008-08-15 at 16:37 -0400, Chris Mason wrote:
> On Fri, 2008-08-15 at 15:59 -0400, Theodore Tso wrote:
> > On Fri, Aug 15, 2008 at 01:52:52PM -0400, Chris Mason wrote:
> > > Have you tried this one:
> > > 
> > > http://article.gmane.org/gmane.linux.file-systems/25560
> > > 
> > > This bug should cause fragmentation on small files getting forced out
> > > due to memory pressure in ext4.  But, I wasn't able to really
> > > demonstrate it with ext4 on my machine.
> > 
> > I've been able to use compilebench to see the fragmentation problem
> > very easily.
> > 
> > Annesh has been workign on it, and has some fixes that he queued up.
> > I'll have to point him at your proposed fix, thanks.  This is what he
> > came up with in the common code.  What do you think?
> > 
> 
> It sounds like ext4 would show the writeback_index bug with
> fragmentation on disk and btrfs would show it with seeks during the
> benchmark.  I was only watching the throughput numbers and not looking
> at filefrag results.
> 

I tried just the writeback_index patch and got only 4 fragmented files
on ext4 after a compilebench run.  Then I tried again and got 1200.
Seems there is something timing dependent in here ;)

By default compilebench uses 256k buffers for writing (see compilebench
-b) and btrfs_file_write will lock down up to 512 pages at a time during
a single write.  This means that for most small files, compilebench will
send the whole file down in one write() and btrfs_file_write will lock
down pages for the entire write() call while working on it.

So, even if pdflush tries to jump in and do the wrong thing, the pages
will be locked by btrfs_file_write and pdflush will end up skipping
them.

With the generic file write routines, pages are locked one at a time,
giving pdflush more windows to trigger delalloc while a write is still
ongoing.

-chris



  reply	other threads:[~2008-08-16 18:10 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-05 19:01 Btrfs v0.16 released Chris Mason
2008-08-07  9:08 ` Peter Zijlstra
2008-08-07 10:34   ` Chris Mason
2008-08-07 14:58     ` Chris Friesen
2008-08-07 15:07     ` tvrtko.ursulin
2008-08-07  9:14 ` Peter Zijlstra
2008-08-07 10:39   ` Chris Mason
     [not found]     ` <3da3b5b40808070703x4cf49471q6acc00351ba019d7@mail.gmail.com>
2008-08-07 14:06       ` Chris Mason
2008-08-07 18:02     ` Andi Kleen
2008-08-08 18:48       ` Chris Mason
2008-08-08 21:56         ` Andi Kleen
2008-08-09  1:19           ` Theodore Tso
2008-08-09  1:23             ` Andi Kleen
     [not found]             ` <20080809012322.GF9038@one.firstfloor.org>
2008-08-09  1:43               ` Theodore Tso
2008-08-14 21:00         ` Chris Mason
2008-08-14 21:17           ` Andi Kleen
2008-08-15  1:25             ` Chris Mason
2008-08-15  1:39               ` Andi Kleen
2008-08-15 13:00                 ` Chris Mason
2008-08-16 19:26                   ` Szabolcs Szakacsits
2008-08-18 13:52                     ` Chris Mason
2008-08-18 17:37                       ` Szabolcs Szakacsits
2008-08-14 23:44           ` Theodore Tso
2008-08-15  1:10             ` Chris Mason
2008-08-15 12:46               ` Chris Mason
2008-08-15 13:45                 ` Theodore Tso
2008-08-15 17:52                   ` Chris Mason
2008-08-15 19:59                     ` Theodore Tso
2008-08-15 20:37                       ` Chris Mason
2008-08-16 18:10                         ` Chris Mason [this message]
2008-08-16 19:27                           ` Theodore Tso

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=1218910210.19495.25.camel@think.oraclecorp.com \
    --to=chris.mason@oracle.com \
    --cc=andi@firstfloor.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tytso@mit.edu \
    /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).