From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, xiubli@redhat.com,
willy@infradead.org, tytso@mit.edu,
torvalds@linux-foundation.org, sfrench@samba.org,
rohiths.msft@gmail.com, nspmangalore@gmail.com,
jefflexu@linux.alibaba.com, idryomov@gmail.com,
dhowells@redhat.com, daire.byrne@gmail.com,
asmadeus@codewreck.org, adilger.kernel@dilger.ca,
dwysocha@redhat.com, akpm@linux-foundation.org
Subject: + mm-netfs-fscache-stop-read-optimisation-when-folio-removed-from-pagecache-fix.patch added to mm-nonmm-unstable branch
Date: Fri, 07 Jul 2023 11:56:40 -0700 [thread overview]
Message-ID: <20230707185641.5196AC433C7@smtp.kernel.org> (raw)
The patch titled
Subject: mm: call folio_mapping() inside folio_needs_release()
has been added to the -mm mm-nonmm-unstable branch. Its filename is
mm-netfs-fscache-stop-read-optimisation-when-folio-removed-from-pagecache-fix.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-netfs-fscache-stop-read-optimisation-when-folio-removed-from-pagecache-fix.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Dave Wysochanski <dwysocha@redhat.com>
Subject: mm: call folio_mapping() inside folio_needs_release()
Date: Fri Jul 7 11:54:53 AM PDT 2023
We must call folio_mapping() inside folio_needs_release() or we will end
up oopsing on an anon page as follows:
RIP: 0010:filemap_release_folio+0x69/0x80
Code: 75 95 00 5d e9 58 7c 95 00 48 85 d2 74 f5 48 8b 8a 98 00 00 00 84 c9 79 ea 48 8b 0f 31 c0 80 e5 80 75 e0 48 8b 82 90 00 00 00 <48> 8b 40 48 48 85 c0 75 cb e8 19 69 15 00 5d e9 23 7c 95 00 0f 0b
RSP: 0018:ffffa89c4057b980 EFLAGS: 00010246
RAX: 0500000001251880 RBX: ffffa89c4057baa8 RCX: 0017ffffc0080005
RDX: ffff90c709bd3f71 RSI: 0000000000000cc0 RDI: ffffebcf45a6e800
RBP: ffffa89c4057b980 R08: ffff90c707f800c0 R09: ffffebcf45a6e808
R10: 0000000000000000 R11: 000000000000000c R12: ffffebcf45a6e800
R13: ffffa89c4057ba08 R14: ffffebcf45a6e808 R15: ffffa89c4057bdb0
FS: 0000000000000000(0000) GS:ffff91443fdc0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4472634000 CR3: 0000000103d8a000 CR4: 0000000000350ee0
Call Trace:
<TASK>
shrink_folio_list+0x746/0xc80
evict_folios+0x272/0x5f0
try_to_shrink_lruvec+0x1f1/0x2d0
shrink_one+0x13b/0x1b0
lru_gen_shrink_node+0x1ee/0x3e0
shrink_node+0x68d/0x730
balance_pgdat+0x41e/0x8c0
kswapd+0x1f4/0x3b0
kthread+0xf9/0x130
ret_from_fork+0x2c/0x50
</TASK>
Link: https://github.com/DaveWysochanskiRH/kernel/commit/902c990e311120179fa5de99d68364b2947b79ec
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reported-by: Daire Byrne <daire.byrne@gmail.com>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Dave Wysochanski <dwysocha@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Dominique Martinet <asmadeus@codewreck.org>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: Jingbo Xu <jefflexu@linux.alibaba.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Rohith Surabattula <rohiths.msft@gmail.com>
Cc: Shyam Prasad N <nspmangalore@gmail.com>
Cc: Steve French <sfrench@samba.org>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/internal.h~mm-netfs-fscache-stop-read-optimisation-when-folio-removed-from-pagecache-fix
+++ a/mm/internal.h
@@ -181,7 +181,7 @@ static inline void set_page_refcounted(s
*/
static inline bool folio_needs_release(struct folio *folio)
{
- struct address_space *mapping = folio->mapping;
+ struct address_space *mapping = folio_mapping(folio);
return folio_has_private(folio) ||
(mapping && mapping_release_always(mapping));
_
Patches currently in -mm which might be from dwysocha@redhat.com are
mm-netfs-fscache-stop-read-optimisation-when-folio-removed-from-pagecache-fix.patch
reply other threads:[~2023-07-07 18:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230707185641.5196AC433C7@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=adilger.kernel@dilger.ca \
--cc=asmadeus@codewreck.org \
--cc=daire.byrne@gmail.com \
--cc=dhowells@redhat.com \
--cc=dwysocha@redhat.com \
--cc=idryomov@gmail.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=nspmangalore@gmail.com \
--cc=rohiths.msft@gmail.com \
--cc=sfrench@samba.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=willy@infradead.org \
--cc=xiubli@redhat.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 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.