From: Zhijian Han <hanzhijian1991@gmail.com>
To: Kiryl Shutsemau <kas@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Nico Pache <nico.pache@linux.dev>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: khugepaged selftest: intermittent collapse_full(madvise:anon) failure and low-memory false failures on arm64 64K
Date: Thu, 22 Oct 2026 08:53:03 +0800 [thread overview]
Message-ID: <20261022005303.750032-1-hanzhijian1991@gmail.com> (raw)
In-Reply-To: <20261020024116.2949892-1-hanzhijian1991@gmail.com>
Hi Kiryl,
Thanks — instrumented as suggested: errno + thp_collapse_alloc_failed
printed on failure, then 30 full runs on the same setup (QEMU arm64 64K,
6G, linux-next 20261019). The failure reproduced 11/30 times and the
data does not point at allocation:
6x EAGAIN, 5x EINVAL, 0x ENOMEM
thp_collapse_alloc_failed=0 in every failing run
Per madvise_collapse_errno(), EAGAIN maps to transient page states
(SCAN_PAGE_LOCK/PAGE_LRU/PAGE_DIRTY_OR_WRITEBACK/...) and EINVAL to
"intrinsic" scan results — neither is the allocation-failure path,
which would have shown ENOMEM and a bump in the counter.
One thing that stands out: madvise_collapse_retry() retries EAGAIN only
once, so two consecutive EAGAINs fail the case even though the errno
table documents EAGAIN as "trying again might succeed". Could the test
retry harder on EAGAIN (loop with a short sleep), or is the single retry
deliberate to expose genuine kernel-side transients?
For the EINVAL cases I would need kernel-side detail on which scan
result is being hit; happy to run instrumented (tracefs or a debug
counter) if you point me at the right knob.
Full 30-run logs and the instrumentation diff available on request.
Understood and agreed on the low-memory guard — dropped.
Assisted-by: LLM (QEMU test harness and instrumentation)
--
Zhijian Han
prev parent reply other threads:[~2026-10-22 0:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 2:41 Zhijian Han
2026-10-21 9:45 ` Kiryl Shutsemau
2026-10-22 0:53 ` Zhijian Han [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=20261022005303.750032-1-hanzhijian1991@gmail.com \
--to=hanzhijian1991@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=kas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nico.pache@linux.dev \
/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®