Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Dave Chinner <david@fromorbit.com>,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2] iomap: avoid deadlock if memory reclaim is triggered in writepage path
Date: Tue, 9 Jun 2020 07:32:11 -0700	[thread overview]
Message-ID: <20200609143211.GA22303@infradead.org> (raw)
In-Reply-To: <CALOAHbCeFFPCVS-toSC32qtLqQsEF1KG6p0OBXkQb=T2g6YpYw@mail.gmail.com>

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.

  reply	other threads:[~2020-06-09 14:32 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 [this message]
2020-06-09 15:36       ` Yafang Shao

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=20200609143211.GA22303@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=laoar.shao@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.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).