From: Venkat <venkat88@linux.ibm.com>
To: Sayali Patil <sayalip@linux.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Ritesh Harjani <ritesh.list@gmail.com>,
David Hildenbrand <david@kernel.org>, Zi Yan <ziy@nvidia.com>,
Michal Hocko <mhocko@kernel.org>,
Oscar Salvador <osalvador@suse.de>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Dev Jain <dev.jain@arm.com>,
Liam.Howlett@oracle.com, linuxppc-dev@lists.ozlabs.org,
Miaohe Lin <linmiaohe@huawei.com>
Subject: Re: [PATCH v4 00/15] selftests/mm: fix failures and robustness improvements
Date: Tue, 7 Apr 2026 18:38:46 +0530 [thread overview]
Message-ID: <2CAD5B1A-7FD2-4C5C-9279-A3131EF60D86@linux.ibm.com> (raw)
In-Reply-To: <cover.1775466329.git.sayalip@linux.ibm.com>
Hi Sayali,
I tested the full series, and overall it looks good. In particular, the
series resolves the issue reported in v2 [1], and the other patches in
the series behaved as expected during my testing.
[1]: https://lore.kernel.org/all/cf815c21-138e-44c8-986d-d8496503ee32@linux.ibm.com/
The only concern I observed is specific to patch 15/15. On systems using
1GB huge pages, I noticed below failure.
./test_hugetlb_memcg
# Hugepage size: 1048576 kB
# memory usage should go back down.
# expected memory: 4194304
# actual memory: 8388608
not ok 1 test_hugetlb_memcg
Apart from this case, the rest of the series tested cleanly for me. Based
on that, it seems that dropping patch 15/15 independently makes sense.
Hence for the series,
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Regards,
Venkat
> On 6 Apr 2026, at 2:49 PM, Sayali Patil <sayalip@linux.ibm.com> wrote:
>
> Hi all,
>
> Powerpc systems with a 64K base page size exposed several issues while
> running mm selftests. Some tests assume specific hugetlb configurations,
> use incorrect interfaces, or fail instead of skipping when the required
> kernel features are not available.
>
> This series fixes these issues and improves test robustness.
>
> Please review the patches and provide any feedback or suggestions for
> improvement.
>
> Thanks,
> Sayali
>
> ---
> v3->v4
>
> - selftests/mm: restore default nr_hugepages value via EXIT
> trap in charge_reserved_hugetlb.sh:
> Updated to use an EXIT trap to restore the original nr_hugepages
> once at script termination, ensuring reliable restoration on all
> exit paths.
>
> - selftest/mm: fix cgroup task placement and drop memory.current checks
> in hugetlb_reparenting_test.sh:
> Updated to use a deterministic synchronization method by migrating the
> workload process within a wrapper subshell before calling exec() to
> ensure correct cgroup accounting.
>
> - selftest/mm: align memory size to huge page size in hugepage-mremap
> test:
> Update test code directly to align memory allocations to the hugepage
> size, rather than modifying run_vmtests.sh. This replaces the previous
> commit “adjust hugepage-mremap test size for large huge pages” with
> a cleaner, direct approach in the test itself.
>
> - selftests/mm: ensure destination is hugetlb-backed in hugepage-mremap:
> Updated to remove MAP_POPULATE flag for the mmap call as per review
> comment.
>
> - selftests/mm: skip uffd-wp-mremap if UFFD write-protect is unsupported:
> Updated as per review comment to initialize features to zero and exit
> on all uffd_get_features() failures, avoiding spurious test errors.
>
> - selftests/mm: move hwpoison setup into run_test() and silence
> modprobe output for memory-failure category:
> Declared LOADED_MOD as local variable and avoided a redundant
> skip message when the module is not found.
> Updated logic to set exitcode to ksft_skip only when no failure has
> been recorded.
>
> - selftests/cgroup: extend test_hugetlb_memcg.c to support all huge
> page sizes:
> Updated to skip on memory constraints instead of returning
> EXIT_FAILURE.
> Updated the logic to fully account for the scenario when the
> per-CPU stock is empty and a refill charges MEMCG_CHARGE_BATCH.
> Updated to avoid overflow on 32-bit systems for memory.max value.
>
> - Included "selftests/mm: restore default nr_hugepages value via
> EXIT trap in hugetlb_reparenting_test.sh"
>
> - Included "selftests/mm: free dynamically allocated PMD-sized
> buffers in split_huge_page_test"
>
> - Included "selftests/mm: clarify alternate unmapping in compaction_test"
>
> - Dropped "selftests/mm: fix double increment in linked list cleanup in
> compaction_test":
> The behaviour is intentional.
>
> v3: https://lore.kernel.org/all/cover.1774591179.git.sayalip@linux.ibm.com/
>
> ---
> v2->v3
> - selftests/mm: skip uffd-wp-mremap if UFFD write-protect is unsupported:
> Rename function to check_uffd_wp_feature_supported() as suggested in review.
> - selftest/mm: fix cgroup task placement and drop memory.current checks
> in hugetlb_reparenting_test.sh:
> Drop memory.current validation from the hugetlb reparenting test.
> Keep tolerance at 7MB (reverting earlier increase to 8MB in v1).
> - Included "selftests/mm: allow PUD-level entries in compound testcase of hmm
> tests" patch:
> Extend the compound testcase checks to accept PUD-level mappings.
> - Included "selftests/mm: replace hardcoded THP size with runtime PMD page size in
> hmm tests" patch:
> Use read_pmd_pagesize() instead of TWOMEG and cap maximum THPs in
> benchmarks to avoid integer overflow.
>
> v2: https://lore.kernel.org/all/cover.1773305677.git.sayalip@linux.ibm.com/
>
> ---
> v1->v2
> - For "selftests/mm: ensure destination is hugetlb-backed in hugepage-mremap":
> update FLAGS definition to MAP_HUGETLB | MAP_SHARED | MAP_POPULATE and
> used it for mmap() calls as suggested during review.
>
> v1: https://lore.kernel.org/all/cover.1773134177.git.sayalip@linux.ibm.com/
> ---
>
> Sayali Patil (15):
> selftests/mm: restore default nr_hugepages value via EXIT trap in
> charge_reserved_hugetlb.sh
> selftests/mm: fix hugetlb pathname construction in
> charge_reserved_hugetlb.sh
> selftests/mm: restore default nr_hugepages value via EXIT trap in
> hugetlb_reparenting_test.sh
> selftests/mm: fix hugetlb pathname construction in
> hugetlb_reparenting_test.sh
> selftests/mm: fix cgroup task placement and drop memory.current checks
> in hugetlb_reparenting_test.sh
> selftests/mm: size tmpfs according to PMD page size in
> split_huge_page_test
> selftests/mm: free dynamically allocated PMD-sized buffers in
> split_huge_page_test
> selftest/mm: align memory size to huge page size in hugepage-mremap
> test
> selftest/mm: register existing mapping with userfaultfd in
> hugepage-mremap
> selftests/mm: ensure destination is hugetlb-backed in hugepage-mremap
> selftests/mm: skip uffd-wp-mremap if UFFD write-protect is unsupported
> selftests/mm: skip uffd-stress test when nr_pages_per_cpu is zero
> selftests/mm: move hwpoison setup into run_test() and silence modprobe
> output for memory-failure category
> selftests/mm: clarify alternate unmapping in compaction_test
> selftests/cgroup: extend test_hugetlb_memcg.c to support all huge page
> sizes
>
> .../selftests/cgroup/test_hugetlb_memcg.c | 90 ++++++++++++++-----
> .../selftests/mm/charge_reserved_hugetlb.sh | 45 ++++++----
> tools/testing/selftests/mm/compaction_test.c | 3 +
> tools/testing/selftests/mm/hugepage-mremap.c | 42 ++++-----
> .../selftests/mm/hugetlb_reparenting_test.sh | 59 ++++++------
> tools/testing/selftests/mm/run_vmtests.sh | 52 +++++++----
> .../selftests/mm/split_huge_page_test.c | 27 ++++--
> tools/testing/selftests/mm/uffd-stress.c | 6 +-
> tools/testing/selftests/mm/uffd-wp-mremap.c | 13 +++
> 9 files changed, 220 insertions(+), 117 deletions(-)
>
> --
> 2.52.0
>
prev parent reply other threads:[~2026-04-07 13:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-06 9:19 Sayali Patil
2026-04-06 9:19 ` [PATCH v4 01/15] selftests/mm: restore default nr_hugepages value via EXIT trap in charge_reserved_hugetlb.sh Sayali Patil
2026-04-07 14:38 ` Zi Yan
2026-04-06 9:19 ` [PATCH v4 02/15] selftests/mm: fix hugetlb pathname construction " Sayali Patil
2026-04-06 9:19 ` [PATCH v4 03/15] selftests/mm: restore default nr_hugepages value via EXIT trap in hugetlb_reparenting_test.sh Sayali Patil
2026-04-07 14:39 ` Zi Yan
2026-04-06 9:19 ` [PATCH v4 04/15] selftests/mm: fix hugetlb pathname construction " Sayali Patil
2026-04-06 9:19 ` [PATCH v4 05/15] selftests/mm: fix cgroup task placement and drop memory.current checks " Sayali Patil
2026-04-06 9:19 ` [PATCH v4 06/15] selftests/mm: size tmpfs according to PMD page size in split_huge_page_test Sayali Patil
2026-04-06 9:19 ` [PATCH v4 07/15] selftests/mm: free dynamically allocated PMD-sized buffers " Sayali Patil
2026-04-07 14:44 ` Zi Yan
2026-04-06 9:19 ` [PATCH v4 08/15] selftest/mm: align memory size to huge page size in hugepage-mremap test Sayali Patil
2026-04-07 14:57 ` Zi Yan
2026-04-08 14:30 ` Sayali Patil
2026-04-06 9:19 ` [PATCH v4 09/15] selftest/mm: register existing mapping with userfaultfd in hugepage-mremap Sayali Patil
2026-04-06 9:19 ` [PATCH v4 10/15] selftests/mm: ensure destination is hugetlb-backed " Sayali Patil
2026-04-06 9:19 ` [PATCH v4 11/15] selftests/mm: skip uffd-wp-mremap if UFFD write-protect is unsupported Sayali Patil
2026-04-06 9:19 ` [PATCH v4 12/15] selftests/mm: skip uffd-stress test when nr_pages_per_cpu is zero Sayali Patil
2026-04-06 9:19 ` [PATCH v4 13/15] selftests/mm: move hwpoison setup into run_test() and silence modprobe output for memory-failure category Sayali Patil
2026-04-07 14:51 ` Zi Yan
2026-04-08 8:36 ` Sayali Patil
2026-04-08 15:40 ` Zi Yan
2026-04-06 9:19 ` [PATCH v4 14/15] selftests/mm: clarify alternate unmapping in compaction_test Sayali Patil
2026-04-06 9:19 ` [PATCH v4 15/15] selftests/cgroup: extend test_hugetlb_memcg.c to support all huge page sizes Sayali Patil
2026-04-07 12:07 ` Sayali Patil
2026-04-07 13:08 ` Venkat [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=2CAD5B1A-7FD2-4C5C-9279-A3131EF60D86@linux.ibm.com \
--to=venkat88@linux.ibm.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@kernel.org \
--cc=osalvador@suse.de \
--cc=ritesh.list@gmail.com \
--cc=sayalip@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=ziy@nvidia.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