Linux-Fsdevel Archive on
help / color / mirror / Atom feed
From: Christoph Hellwig <>
To: Yafang Shao <>
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: <> (raw)
In-Reply-To: <>

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 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v2] iomap: avoid deadlock if memory reclaim is triggered in writepage path' \

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