linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-mm@kvack.org,
	Ext4 Developers List <linux-ext4@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org, chris.mason@oracle.com
Subject: Re: [PATCH, RFC] vm: Add an tuning knob for vm.max_writeback_pages
Date: Mon, 31 Aug 2009 08:37:10 -0400	[thread overview]
Message-ID: <20090831123710.GH20822@mit.edu> (raw)
In-Reply-To: <20090831104748.GT12579@kernel.dk>

On Mon, Aug 31, 2009 at 12:47:49PM +0200, Jens Axboe wrote:
> It's because ext4 writepages sets ->range_start and wb_writeback() is
> range cyclic, then the next iteration will have the previous end point
> as the starting point. Looks like we need to clear ->range_start in
> wb_writeback(), the better place is probably to do that in
> fs/fs-writeback.c:generic_sync_wb_inodes() right after the
> writeback_single_inode() call. This, btw, should be no different than
> the current code, weird/correct or not :-)

Hmm, or we could have ext4_da_writepages save and restore
->range_start.  One of the things that's never been well documented is
exactly what the semantics are of the various fields in the wbc
struct, and who is allowed to modify which fields when.

If you have some time, it would be great if you could document the
rules filesystems should be following with respect to the wbc struct,
and then we can audit each filesystem to make sure they follow those
rules.  One of the things which is a bit scary about how the many wbc
flags work is that each time a filesystem wants some particular
behavior, it seems like we need to dive into writeback code, and
figure out some combination of flags/settings that make the page
writeback code do what we wants, and sometimes it's not clear whether
that was a designed-in semantic of the interface, or just something
that happened to work given the current implementation.

In any case, if one of the rules is that the filesystems' writepages
command shouldn't be modifying range_start, we can fix this problem up
by saving and restore range_start inside ext4_da_writepages().

							- Ted

  reply	other threads:[~2009-08-31 12:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1251600858-21294-1-git-send-email-tytso@mit.edu>
2009-08-30 16:52 ` [PATCH, RFC] vm: Add an tuning knob for vm.max_writeback_pages Christoph Hellwig
2009-08-30 18:17   ` Theodore Tso
2009-08-30 22:27     ` Christoph Hellwig
2009-08-31  3:08       ` Theodore Tso
2009-08-31 10:29         ` Jens Axboe
2009-08-31 10:47           ` Jens Axboe
2009-08-31 12:37             ` Theodore Tso [this message]
2009-08-31 15:54             ` Theodore Tso
2009-08-31 20:36               ` Jens Axboe
2009-08-31 21:03             ` Theodore Tso
2009-09-01  7:57               ` Aneesh Kumar K.V
2009-09-01  9:17               ` Jens Axboe
2009-09-01 18:00     ` Chris Mason
2009-09-01 20:30       ` 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=20090831123710.GH20822@mit.edu \
    --to=tytso@mit.edu \
    --cc=chris.mason@oracle.com \
    --cc=hch@infradead.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.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).