From: mawupeng <mawupeng1@huawei.com>
To: <akpm@linux-foundation.org>, <minchan@kernel.org>,
<hannes@cmpxchg.org>, <kirill.shutemov@linux.intel.com>,
<npiggin@suse.de>, <linux-mm@kvack.org>,
<n-horiguchi@ah.jp.nec.com>, <will@kernel.org>,
<wangkefeng.wang@huawei.com>, <linux-kernel@vger.kernel.org>
Subject: Warning on isolate tail page in isolate_lru_page
Date: Thu, 19 May 2022 08:58:25 +0800 [thread overview]
Message-ID: <d927a335-a70b-48d3-9645-1d33cc88bd9c@huawei.com> (raw)
Hi
Recently I receive a warning in isolate_lru_page() reported by syzkaller.
This warning occurred in linux-v5.10 and can't be be reproduced.
The following two commits are the major changes since v5.10:
Commit ac1e9acc5acf ("mm: rearrange madvise code to allow for reuse") refactor
do_madvise in master and lead to call madvise_vma_behavior() instead of
madvise_vma(). For page out these is no difference because both all them will
call madvise_pageout() int the end.
Commit a72afd873089 ("tlb: mmu_gather: Remove start/end arguments from tlb_gather_mmu()")
remove start/end arguments from tlb_gather_mmu in madvise_pageout() since they
are no longer needed.
Warn msg "trying to isolate tail page" will be reported in isolate_lru_page()
if this page is a tail page.
However, if this page is a tail page, it will be split in
madvise_cold_or_pageout_pte_range(). Read lock mmap_read_lock(mm) is hold since
do_madvise() so no one can modify this. So the only reason I can image is
that something is wrong in split_huge_page().
do_madvise
mmap_read_lock(mm);
madvise_pageout
madvise_cold_or_pageout_pte_range
split_huge_page(page) <-- split this huge page
isolate_lru_page(page)
WARN_RATELIMIT(PageTail(page), "trying to isolate tail page");
The warning log is shown below:
==============================================================
WARNING: CPU: 1 PID: 26735 at mm/vmscan.c:1968 isolate_lru_page+0x44d/0x460 mm/vmscan.c:1968
Modules linked in:
RAX: 06bc73006006b800 RBX: 0000000000000001 RCX: 0000000009400000
RDX: ffffc90016103000 RSI: 0000000000000344 RDI: 0000000000000345
RBP: 0000000000000001 R08: ffffffff8a58bab9 R09: ffffed100c4c4f23
R10: ffffed100c4c4f23 R11: 1ffff1100c4c4f22 R12: ffffea0001d59a00
R13: ffffea0001d59bc0 R14: ffffea0001d59bc8 R15: 0000000020ffb000
FS: 00007f00b4284700(0000) GS:ffff88811b280000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000007541ff CR3: 0000000033dec004 CR4: 00000000003706e0
Call Trace:
madvise_cold_or_pageout_pte_range+0x511/0x6d0 mm/madvise.c:460
walk_pmd_range mm/pagewalk.c:89 [inline]
walk_pud_range mm/pagewalk.c:160 [inline]
walk_p4d_range+0x7f3/0xdb0 mm/pagewalk.c:193
walk_pgd_range+0x2d3/0x360 mm/pagewalk.c:229
__walk_page_range+0xda/0x360 mm/pagewalk.c:331
walk_page_range+0x166/0x380 mm/pagewalk.c:427
madvise_vma mm/madvise.c:520 [inline]
do_madvise+0x159d/0x1810 mm/madvise.c:1137
__do_sys_madvise mm/madvise.c:1163 [inline]
__se_sys_madvise mm/madvise.c:1161 [inline]
__x64_sys_madvise+0x5d/0x70 mm/madvise.c:1161
do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
I have no idea how to fix this warning, so is there anything else need to
analysis that I haven't considered?
Thanks.
reply other threads:[~2022-05-19 0:58 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=d927a335-a70b-48d3-9645-1d33cc88bd9c@huawei.com \
--to=mawupeng1@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=npiggin@suse.de \
--cc=wangkefeng.wang@huawei.com \
--cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox