From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: cluster-devel <cluster-devel@redhat.com>,
"Christoph Hellwig" <hch@lst.de>,
"Bob Peterson" <rpeterso@redhat.com>, "Jan Kara" <jack@suse.cz>,
"Dave Chinner" <david@fromorbit.com>,
"Ross Lagerwall" <ross.lagerwall@citrix.com>,
"Mark Syms" <Mark.Syms@citrix.com>,
"Edwin Török" <edvin.torok@citrix.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-mm@kvack.org
Subject: Re: [PATCH v7 5/5] gfs2: Fix iomap write page reclaim deadlock
Date: Tue, 30 Apr 2019 08:47:07 -0700 [thread overview]
Message-ID: <20190430154707.GG5200@magnolia> (raw)
In-Reply-To: <CAHc6FU5hHFWeGM8+fhfaNs22cSG+wtuTKZcMMKbfeetg1CK4BQ@mail.gmail.com>
On Tue, Apr 30, 2019 at 05:39:28PM +0200, Andreas Gruenbacher wrote:
> On Tue, 30 Apr 2019 at 17:33, Darrick J. Wong <darrick.wong@oracle.com> wrote:
> > On Tue, Apr 30, 2019 at 12:09:34AM +0200, Andreas Gruenbacher wrote:
> > > Since commit 64bc06bb32ee ("gfs2: iomap buffered write support"), gfs2 is doing
> > > buffered writes by starting a transaction in iomap_begin, writing a range of
> > > pages, and ending that transaction in iomap_end. This approach suffers from
> > > two problems:
> > >
> > > (1) Any allocations necessary for the write are done in iomap_begin, so when
> > > the data aren't journaled, there is no need for keeping the transaction open
> > > until iomap_end.
> > >
> > > (2) Transactions keep the gfs2 log flush lock held. When
> > > iomap_file_buffered_write calls balance_dirty_pages, this can end up calling
> > > gfs2_write_inode, which will try to flush the log. This requires taking the
> > > log flush lock which is already held, resulting in a deadlock.
> >
> > /me wonders how holding the log flush lock doesn't seriously limit
> > performance, but gfs2 isn't my fight so I'll set that aside and assume
> > that a patch S-o-B'd by both maintainers is ok. :)
>
> This only affects inline and journaled data, not standard writes, so
> it's not quite as bad as it looks.
Ah, ok.
> > How should we merge this patch #5? It doesn't touch fs/iomap.c itself,
> > so do you want me to pull it into the iomap branch along with the
> > previous four patches? That would be fine with me (and easier than a
> > multi-tree merge mess)...
>
> I'd prefer to get this merged via the gfs2 tree once the iomap fixes
> have been pulled.
Ok, I'll take the first four patches through the iomap branch and cc you
on the pull request.
--D
>
> Thanks,
> Andreas
next prev parent reply other threads:[~2019-04-30 15:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 22:09 [PATCH v7 0/5] iomap and gfs2 fixes Andreas Gruenbacher
2019-04-29 22:09 ` [PATCH v7 1/5] iomap: Clean up __generic_write_end calling Andreas Gruenbacher
2019-04-30 15:14 ` Darrick J. Wong
2019-04-29 22:09 ` [PATCH v7 2/5] fs: Turn __generic_write_end into a void function Andreas Gruenbacher
2019-04-30 10:29 ` Christoph Hellwig
2019-04-30 15:17 ` Darrick J. Wong
2019-04-29 22:09 ` [PATCH v7 3/5] iomap: Fix use-after-free error in page_done callback Andreas Gruenbacher
2019-04-30 15:23 ` Darrick J. Wong
2019-04-29 22:09 ` [PATCH v7 4/5] iomap: Add a page_prepare callback Andreas Gruenbacher
2019-04-30 15:26 ` Darrick J. Wong
2019-04-29 22:09 ` [PATCH v7 5/5] gfs2: Fix iomap write page reclaim deadlock Andreas Gruenbacher
2019-04-30 15:32 ` Darrick J. Wong
2019-04-30 15:39 ` Andreas Gruenbacher
2019-04-30 15:47 ` Darrick J. Wong [this message]
2019-04-30 16:15 ` Andreas Grünbacher
2019-04-30 2:50 ` [PATCH v7 0/5] iomap and gfs2 fixes Darrick J. Wong
2019-04-30 21:21 ` Dave Chinner
2019-05-01 15:06 ` Darrick J. Wong
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=20190430154707.GG5200@magnolia \
--to=darrick.wong@oracle.com \
--cc=Mark.Syms@citrix.com \
--cc=agruenba@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=david@fromorbit.com \
--cc=edvin.torok@citrix.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ross.lagerwall@citrix.com \
--cc=rpeterso@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).