linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: darrick.wong@oracle.com, david@fromorbit.com, hch@infradead.org,
	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:03:04 -0700	[thread overview]
Message-ID: <20200609140304.GA11626@infradead.org> (raw)
In-Reply-To: <1591254347-15912-1-git-send-email-laoar.shao@gmail.com>

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.

  parent reply	other threads:[~2020-06-09 14:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  7:05 [PATCH v2] iomap: avoid deadlock if memory reclaim is triggered in writepage path Yafang Shao
2020-06-09 13:53 ` Yafang Shao
2020-06-09 14:03 ` Christoph Hellwig [this message]
2020-06-09 14:28   ` Yafang Shao
2020-06-09 14:32     ` Christoph Hellwig
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=20200609140304.GA11626@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 \
    /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).