All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Badari Pulavarty <pbadari@gmail.com>
Cc: Linux Filesystems <linux-fsdevel@vger.kernel.org>,
	Mark Fasheh <mark.fasheh@oracle.com>,
	Steven Whitehouse <swhiteho@redhat.com>
Subject: Re: [ANNOUNCE] new new aops patchset
Date: Wed, 4 Apr 2007 05:05:15 +0200	[thread overview]
Message-ID: <20070404030515.GD18507@wotan.suse.de> (raw)
In-Reply-To: <1175621720.31817.4.camel@dyn9047017100.beaverton.ibm.com>

On Tue, Apr 03, 2007 at 10:35:19AM -0700, Badari Pulavarty wrote:
> On Mon, 2007-04-02 at 14:09 +0200, Nick Piggin wrote:
> > Updated aops patchset against 2.6.21-rc5.
> > 
> > http://www.kernel.org/pub/linux/kernel/people/npiggin/patches/new-aops/
> > 
> > Files/dirs are 2.6.21-rc5-new-aops*
> 
> Here is the ext4 support for it. This is a simple port from 
> ext3 code. Ran fsx without any problems :)

Thanks. Again, I guess this needs updating for write_failure backout :(


> BTW, I never clearly understood what exactly the problem these
> new interfaces are solving and how :( I can dig through the
> archives and try to figure out. Would you care to put a 
> small description of the *actual* problem and how these
> new aops are needed (vs hacking the existing methods).

OK, so the problem from my point of view is the pagecache write
deadlock:

http://www.kernel.org/pub/linux/kernel/people/npiggin/patches/new-aops/2.6.21-rc5-new-aops/broken-out/mm-pagecache-write-deadlocks.patch

The problem with that fix is that it requires an extra copy (I
thought long and hard about different ways to fix this without
changing the aops API and without taking a performance hit).

It was pretty clear that the problem can be fixed easily and efficiently
in the mm/ code if the the API can be changed a bit (eg.
allow commit_write to commit a range which is smaller than the
prepare_write range).

The problem with changing the API is that you break all filesystems,
and out of tree filesystems. Even if we ignore the out of tree ones,
the existing ones can have difficult and subtle issues that I cannot
fix alone.

So I decided that the best way to go is to introduce the "slow" fix
for everyone, then add these new aops. Once everyone is moved to
the new aops, we remove the old ones and a lot of old cruft with
them.

So at this point we can make a clean break and come up with an API
that is not only capable of fixing the deadlock, but is also better
suited to modern filesystems (prepare_write was intorduced in 2.2 or
2.0 IIRC, and probably suffered from deadlocks even then!).

I don't know if write_begin/ write_end is final yet (which is why we
need your input), but it already does help a lot with the clustered
filesystems right now.

The reason we also have the (still unused) perform_write, is that was
my first attempt at a new interface. The problem with that is that
it is difficult to provide generic block helpers that are usable in
more complex ways. It also cannot be used for source data other than
memory in iovecs. However the reason why it is still there is because
I already introduced the iov_iter and infrastructure for it, and I
think it is a very nice, clean interface, and can be good for
high performance writes (I got positive results even with a naive
ext2 implementation).

Does that answer your question?

Thanks,
Nick

  reply	other threads:[~2007-04-04  3:05 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-02 12:09 [ANNOUNCE] new new aops patchset Nick Piggin
2007-04-02 20:18 ` Badari Pulavarty
2007-04-03  0:45   ` Nick Piggin
2007-04-02 20:44 ` Badari Pulavarty
2007-04-02 23:58   ` Nick Piggin
2007-04-03 15:59     ` Badari Pulavarty
2007-04-04  2:33       ` Nick Piggin
2007-04-02 21:44 ` Badari Pulavarty
2007-04-02 23:08 ` Badari Pulavarty
2007-04-02 23:14 ` Badari Pulavarty
2007-04-02 23:49   ` Nick Piggin
2007-04-03 15:57     ` Badari Pulavarty
2007-04-04  2:31       ` Nick Piggin
2007-04-02 23:31 ` Badari Pulavarty
2007-04-02 23:35   ` Nick Piggin
2007-04-02 23:56 ` Badari Pulavarty
2007-04-03  0:02   ` Nick Piggin
2007-04-03  0:00 ` Badari Pulavarty
2007-04-03  0:08   ` Nick Piggin
2007-04-03  9:31     ` Nick Piggin
2007-04-03 16:03       ` Badari Pulavarty
2007-04-04  2:37         ` Nick Piggin
2007-04-03 17:35 ` Badari Pulavarty
2007-04-04  3:05   ` Nick Piggin [this message]
2007-04-04 22:10 ` Mark Fasheh
2007-04-04 22:39   ` Badari Pulavarty
2007-04-04 22:51     ` Mark Fasheh
2007-04-04 23:02       ` Badari Pulavarty
2007-04-04 23:05   ` Badari Pulavarty
2007-04-04 23:17     ` Mark Fasheh
2007-04-04 23:32       ` Badari Pulavarty
2007-04-05  2:08         ` Nick Piggin
2007-04-05 15:21           ` Badari Pulavarty
2007-04-06  1:38             ` Nick Piggin
2007-04-05  2:09   ` Nick Piggin
2007-04-05  0:10 ` David Chinner
2007-04-05  2:13   ` Nick Piggin
2007-04-05  7:45     ` Christoph Hellwig
2007-04-05  7:58       ` Nick Piggin
2007-04-05  2:43   ` David Chinner
2007-04-05  3:00     ` Nick Piggin
2007-04-05  6:18       ` David Chinner
2007-04-05  6:40         ` Nick Piggin

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=20070404030515.GD18507@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mark.fasheh@oracle.com \
    --cc=pbadari@gmail.com \
    --cc=swhiteho@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 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.