linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Chris Mason <chris.mason@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mikulas Patocka <mpatocka@redhat.com>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org
Subject: Re: [patch 5/8] mm: write_cache_pages integrity fix
Date: Fri, 10 Oct 2008 04:40:39 +0200	[thread overview]
Message-ID: <20081010024039.GA13779@wotan.suse.de> (raw)
In-Reply-To: <1223565394.14090.34.camel@think.oraclecorp.com>

On Thu, Oct 09, 2008 at 11:16:34AM -0400, Chris Mason wrote:
> On Thu, 2008-10-09 at 16:50 +0200, Nick Piggin wrote:
> > 
> > The comment in WB_SYNC_NONE definition kind of suggests it meant don't
> > wait for anything when it was written...
> 
> That seems to have turned into wbc->nonblocking.  WB_SYNC_NONE doesn't
> stop other blocking inside the FS (delalloc and other fun).

Right, and neither does nonblocking in all cases ;)

Anyway, I completely agree that it is unclear at best and could really
use a spring clean of the fields and their semantics.


> > > At the write_cache_pages level, WB_SYNC_NONE should only change the
> > > waiting for IO in flight.
> > 
> > Aside from do_sync_mapping_range, what are other reasons to enforce
> > the same thing all up and down the writeout stack? If there are good
> > reasons, let's add WB_SYNC_WRITEBACK?
> 
> Your change to skip writeback pages that aren't dirty makes WB_SYNC_ALL
> almost the same as WB_SYNC_WRITEBACK.  With that in place we're pretty
> deep into grey areas where people may not want to go around rewriting
> pages that were dirtied after their sync began.

Yeah, they definitely do, though that's a slightly different problem. At
the moment, any dirty pages found in a data integrity operation *must* be
written out. Because we have no idea when they were dirtied. This is
how sync can get stuck behind write(2) for a long time (and this is why our
sync has traditionally bailed out after ->nrpages*2).

I have further patches to add a new tag to the radix-tree to mark all the
pages to sync up-front to solve this nicely. Mikulas has a different
approach to instead throttle the dirtiers. Whichever approach is favoured 
should be the next step after this round of patches.


> At least that's what I think the idea behind do_sync_mapping_range using
> WB_SYNC_NONE was.

do_sync_mapping_range indeed can ignore dirty,writeback pages, because its
data integrity operation would wait for writeback, then write dirty, then
wait for writeback again. This is quite a corner-case, for its unusual
semantics though. You may just as well not wait for writeback to start
with, but wait for them in the writeout pass (and only if they are dirty):
that will likely be as fast or faster anyway.


  reply	other threads:[~2008-10-10  2:40 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09 15:50 [patch 0/8] write_cache_pages fixes npiggin
2008-10-09 15:50 ` [patch 1/8] mm: write_cache_pages cyclic fix npiggin
2008-10-09 15:50 ` [patch 2/8] mm: write_cache_pages AOP_WRITEPAGE_ACTIVATE fix npiggin
2008-10-10 16:00   ` Miklos Szeredi
2008-10-10 18:29     ` Hugh Dickins
2008-10-11  4:05       ` Nick Piggin
2008-10-09 15:50 ` [patch 3/8] mm: write_cache_pages writepage error fix npiggin
2008-10-09 15:50 ` [patch 4/8] mm: write_cache_pages type overflow fix npiggin
2008-10-09  8:23   ` Christoph Hellwig
2008-10-09  8:33     ` Nick Piggin
2008-10-10 13:10     ` Theodore Tso
2008-10-10 13:13       ` Christoph Hellwig
2008-10-10 13:37         ` Theodore Tso
2008-10-10 13:48           ` Steven Whitehouse
2008-10-10 14:05             ` Theodore Tso
2008-10-10 14:08               ` Christoph Hellwig
2008-10-10 15:54                 ` Aneesh Kumar K.V
2008-10-10 15:59                   ` Chris Mason
2008-10-10 16:10                   ` Theodore Tso
2008-10-10 16:34                   ` Christoph Hellwig
2008-10-10 13:56           ` Chris Mason
2008-10-09 15:50 ` [patch 5/8] mm: write_cache_pages integrity fix npiggin
2008-10-09 12:52   ` Chris Mason
2008-10-09 13:27     ` Nick Piggin
2008-10-09 13:35       ` Chris Mason
2008-10-09 13:55         ` Nick Piggin
2008-10-09 14:12           ` Chris Mason
2008-10-09 14:21             ` Nick Piggin
2008-10-09 14:39               ` Chris Mason
2008-10-09 14:50                 ` Nick Piggin
2008-10-09 15:16                   ` Chris Mason
2008-10-10  2:40                     ` Nick Piggin [this message]
2008-10-09 15:50 ` [patch 6/8] mm: write_cache_pages cleanups npiggin
2008-10-09 14:37   ` Artem Bityutskiy
2008-10-09 15:50 ` [patch 7/8] mm: write_cache_pages optimise page cleaning npiggin
2008-10-09 15:50 ` [patch 8/8] mm: write_cache_pages terminate quickly npiggin

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=20081010024039.GA13779@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=chris.mason@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mpatocka@redhat.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;
as well as URLs for NNTP newsgroup(s).