public inbox for linux-erofs@ozlabs.org
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: jiucheng.xu@amlogic.com, Gao Xiang <xiang@kernel.org>,
	Yue Hu <zbestahu@gmail.com>,
	Jeffle Xu <jefflexu@linux.alibaba.com>,
	Sandeep Dhavale <dhavale@google.com>,
	Hongbo Li <lihongbo22@huawei.com>,
	Chunhai Guo <guochunhai@vivo.com>
Cc: chao@kernel.org, linux-erofs@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, jianxin.pan@amlogic.com,
	tuan.zhang@amlogic.com
Subject: Re: [PATCH v2] erofs: add GFP_NOIO in the bio completion if needed
Date: Wed, 18 Mar 2026 14:07:21 +0800	[thread overview]
Message-ID: <4acad3d6-ce48-4191-970a-95bcbe8edb01@kernel.org> (raw)
In-Reply-To: <20260311-origin-dev-v2-1-0657cff690eb@amlogic.com>

On 2026/3/11 17:11, Jiucheng Xu via B4 Relay wrote:
> From: Jiucheng Xu <jiucheng.xu@amlogic.com>
> 
> The bio completion path in the process context (e.g. dm-verity)
> will directly call into decompression rather than trigger another
> workqueue context for minimal scheduling latencies, which can
> then call vm_map_ram() with GFP_KERNEL.
> 
> Due to insufficient memory, vm_map_ram() may generate memory
> swapping I/O, which can cause submit_bio_wait to deadlock
> in some scenarios.
> 
> Trimmed down the call stack, as follows:
> 
> f2fs_submit_read_io
>    submit_bio                      //bio_list is initialized.
>      mmc_blk_mq_recovery
>        z_erofs_endio
>          vm_map_ram
>            __pte_alloc_kernel
>              __alloc_pages_direct_reclaim
>                shrink_folio_list
>                  __swap_writepage
>                    submit_bio_wait  //bio_list is non-NULL, hang!!!
> 
> Use memalloc_noio_{save,restore}() to wrap up this path.
> 
> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
> Signed-off-by: Jiucheng Xu <jiucheng.xu@amlogic.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


      reply	other threads:[~2026-03-18  6:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11  9:11 [PATCH v2] erofs: add GFP_NOIO in the bio completion if needed Jiucheng Xu via B4 Relay
2026-03-18  6:07 ` Chao Yu [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=4acad3d6-ce48-4191-970a-95bcbe8edb01@kernel.org \
    --to=chao@kernel.org \
    --cc=dhavale@google.com \
    --cc=guochunhai@vivo.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=jianxin.pan@amlogic.com \
    --cc=jiucheng.xu@amlogic.com \
    --cc=lihongbo22@huawei.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tuan.zhang@amlogic.com \
    --cc=xiang@kernel.org \
    --cc=zbestahu@gmail.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