Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: Christoph Hellwig <hch@infradead.org>,
	Michal Hocko <mhocko@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
	Dave Chinner <david@fromorbit.com>,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Linux MM <linux-mm@kvack.org>
Subject: Re: [PATCH v2] iomap: avoid deadlock if memory reclaim is triggered in writepage path
Date: Tue, 9 Jun 2020 23:36:40 +0800	[thread overview]
Message-ID: <CALOAHbDvMwZikzpyh6hzm38pcksJGF+achb+C1SLUA2ovip8mA@mail.gmail.com> (raw)
In-Reply-To: <20200609143211.GA22303@infradead.org>

On Tue, Jun 9, 2020 at 10:32 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Tue, Jun 09, 2020 at 10:28:06PM +0800, Yafang Shao wrote:
> > On Tue, Jun 9, 2020 at 10:03 PM Christoph Hellwig <hch@infradead.org> wrote:
> > >
> > > On Thu, Jun 04, 2020 at 03:05:47AM -0400, Yafang Shao wrote:
> > > > Recently there is a XFS deadlock on our server with an old kernel.
> > > > This deadlock is caused by allocating memory in xfs_map_blocks() while
> > > > doing writeback on behalf of memroy reclaim. Although this deadlock happens
> > > > on an old kernel, I think it could happen on the upstream as well. This
> > > > issue only happens once and can't be reproduced, so I haven't tried to
> > > > reproduce it on upsteam kernel.
> > >
> > > The report looks sensible, but I don't think the iomap code is the
> > > right place for this.  Until/unless the VM people agree that
> > > ->writepages(s) generally should not recurse into the fs I think the
> > > low-level file system allocating is the right place, so xfs_map_blocks
> > > would seem like the correct place.
> >
> > Thanks for your comment.
> > That is what I did in the previous version [1].
> > So should I resend the v1 ?
>
> Well, v1 won't apply.  But I do prefer the approach there.

All right. Let's include MM maintainers and see the opinion from them.

Hi Michal, Andrew,

What's your opinion on this XFS deadlock ?
Should ->writepages(s) generally not recurse into the fs ?


-- 
Thanks
Yafang

      reply	other threads:[~2020-06-09 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  7:05 Yafang Shao
2020-06-09 13:53 ` Yafang Shao
2020-06-09 14:03 ` Christoph Hellwig
2020-06-09 14:28   ` Yafang Shao
2020-06-09 14:32     ` Christoph Hellwig
2020-06-09 15:36       ` Yafang Shao [this message]

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=CALOAHbDvMwZikzpyh6hzm38pcksJGF+achb+C1SLUA2ovip8mA@mail.gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --subject='Re: [PATCH v2] iomap: avoid deadlock if memory reclaim is triggered in writepage path' \
    /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

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).