From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Zhaoyang Huang <huangzhaoyang@gmail.com>
Cc: "zhaoyang.huang" <zhaoyang.huang@unisoc.com>,
Gao Xiang <xiang@kernel.org>, Chao Yu <chao@kernel.org>,
Yue Hu <huyue2@coolpad.com>,
Jeffle Xu <jefflexu@linux.alibaba.com>,
Sandeep Dhavale <dhavale@google.com>,
linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org,
steve.kang@unisoc.com
Subject: Re: [PATCH] fs: fix schedule while atomic caused by gfp of erofs_allocpage
Date: Tue, 16 Jul 2024 14:50:14 +0800 [thread overview]
Message-ID: <8754d1f7-1180-4a7a-a2c5-40aa9147fad6@linux.alibaba.com> (raw)
In-Reply-To: <dedea322-c2c5-4e1b-b5c6-0889a78c19fa@linux.alibaba.com>
On 2024/7/16 14:46, Gao Xiang wrote:
>
>
> On 2024/7/16 14:43, Zhaoyang Huang wrote:
>> On Tue, Jul 16, 2024 at 2:20 PM Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
>>>
>>>
>>>
>
> ...
>
>>>>>
>>>>> I don't see why it's an atomic context,
>>>>> so this patch is incorrect.
>>>> Sorry, I should provide more details. page_cache_ra_unbounded() will
>>>> call filemap_invalidate_lock_shared(mapping) to ensure the integrity
>>>> of page cache during readahead, which will disable preempt.
>>>
>>> Why a rwsem sleepable lock disable preemption?
>> emm, that's the original design of down_read()
>
> No.
>
>>
>>> context should be always non-atomic context, which is applied
>>> to all kernel filesystems.
>> AFAICT, filemap_fault/read have added the folios of readahead to page
>> cache which means the aops->readahead basically just need to map the
>> block to this folios and then launch the bio. The erofs is a little
>> bit different to others as it has to alloc_pages for decompression
>> when doing this.
>
> Interesting. The whole .readahead is sleepable, including
> submit block I/Os to storage.
Also, please don't imagine your stack trace if it's a non-upstream
kernel.
>
> Nacked-by: Gao Xiang <hsiangkao@linux.alibaba.com>
>
> Thanks,
> Gao Xiang
next prev parent reply other threads:[~2024-07-16 6:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 5:44 zhaoyang.huang
2024-07-16 5:50 ` Gao Xiang
2024-07-16 6:14 ` Zhaoyang Huang
2024-07-16 6:19 ` Gao Xiang
2024-07-16 6:43 ` Zhaoyang Huang
2024-07-16 6:46 ` Gao Xiang
2024-07-16 6:50 ` Gao Xiang [this message]
2024-07-16 7:41 ` Zhaoyang Huang
2024-07-16 7:47 ` Gao Xiang
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=8754d1f7-1180-4a7a-a2c5-40aa9147fad6@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=chao@kernel.org \
--cc=dhavale@google.com \
--cc=huangzhaoyang@gmail.com \
--cc=huyue2@coolpad.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=steve.kang@unisoc.com \
--cc=xiang@kernel.org \
--cc=zhaoyang.huang@unisoc.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
all inboxes | Powered by JetHome®