From: Andrew Morton <akpm@linux-foundation.org>
To: Wenjie Qi <qwjhust@gmail.com>
Cc: willy@infradead.org, jack@suse.cz, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
baohua@kernel.org, axboe@kernel.dk,
trond.myklebust@hammerspace.com, tz2294@columbia.edu,
qiwenjie@xiaomi.com
Subject: Re: [PATCH v3] mm: filemap: retain mapped dropbehind folios
Date: Sat, 29 Aug 2026 11:16:21 -0700 [thread overview]
Message-ID: <20260829111621.41ed2bc9a0e99e3367eb96c3@linux-foundation.org> (raw)
In-Reply-To: <4aba05e1a2c3b61cb337d373eb9b7a8db4ddd822.1788024049.git.qiwenjie@xiaomi.com>
On Sun, 30 Aug 2026 01:36:12 +0800 Wenjie Qi <qwjhust@gmail.com> wrote:
> From: Wenjie Qi <qiwenjie@xiaomi.com>
>
> Fault-around can map ready dropbehind folios without going through the
> normal page-cache lookup that clears dropbehind. A mapping represents a
> competing cached user, so retain the folio instead of forcibly unmapping it
> when writeback completes.
>
> For a mapped folio, folio_unmap_invalidate() can call
> unmap_mapping_folio(), which takes i_mmap_rwsem and may sleep. Retaining
> mapped folios avoids this path when folio_end_dropbehind() runs in
> non-preemptible task context.
>
> Unmapped dropbehind folios continue through the existing invalidation path.
Thanks.
When fixing a bug, please always provide a very clear description of the
userspace-visible runtime effects of that bug.
From the above it appears that the current code can trigger a
sleeping-in-atomic warning? Has this been observed in any situation?
Is there a report?
chatgpt easily prepared a reproducer for me, which I haven't run.
If I'm correct in the above, we should backport this fix with a
cc:stable tag, do you agree?
next prev parent reply other threads:[~2026-08-29 18:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 14:29 [PATCH] mm: filemap: tighten dropbehind completion context check Wenjie Qi
2026-08-20 14:34 ` Matthew Wilcox
2026-08-21 1:23 ` Wenjie Qi
2026-08-21 3:30 ` Matthew Wilcox
2026-08-24 13:34 ` Wenjie Qi
2026-08-29 1:10 ` Andrew Morton
2026-08-29 12:13 ` Wenjie Qi
2026-08-30 8:45 ` Barry Song
2026-08-29 12:30 ` [PATCH v2] mm: filemap: retain mapped dropbehind folios Wenjie Qi
2026-08-29 14:47 ` Matthew Wilcox
2026-08-29 15:53 ` Tal Zussman
2026-08-29 16:09 ` Tal Zussman
2026-08-29 17:36 ` [PATCH v3] " Wenjie Qi
2026-08-29 18:16 ` Andrew Morton [this message]
2026-08-30 3:25 ` [PATCH v4] " Wenjie Qi
2026-08-30 8:35 ` Barry Song
2026-08-30 9:13 ` Wenjie Qi
2026-08-30 9:31 ` Barry Song
2026-08-30 11:58 ` Tal Zussman
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=20260829111621.41ed2bc9a0e99e3367eb96c3@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=baohua@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=qiwenjie@xiaomi.com \
--cc=qwjhust@gmail.com \
--cc=trond.myklebust@hammerspace.com \
--cc=tz2294@columbia.edu \
--cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.