All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] selftests/mm: run all hugetlb cgroup reservation tests
@ 2026-12-04 17:31 Kurt Lin
  2026-12-04 17:31 ` [PATCH 1/4] selftests/mm: don't wait for a hugetlb reservation that is expected to fail Kurt Lin
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Kurt Lin @ 2026-12-04 17:31 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Hildenbrand, Liam R. Howlett, Vlastimil Babka,
	Mike Rapoport, Michal Hocko, Shuah Khan, Mina Almasry,
	Sayali Patil, Zi Yan, Song Hu, linux-mm, linux-kselftest,
	linux-kernel, Li Wang, Kurt Lin

Song's "selftests/mm: restore hidden hugetlb reservation scenarios" was
dropped from mm-unstable because it made the hugetlb category of the
linux-mm CI time out [1]. The time goes into a 60 second wait in the
cases that expect a reservation to fail. As there has been no follow-up,
this series carries Song's patch (3/4, unchanged) behind fixes for that
(1-2/4), and fixes the multiple cgroups test it had to leave skipped
(4/4). That test failed only because of bugs in the script.

Tested in a virtme-ng guest on mm-new: charge_reserved_hugetlb.sh
-cgroup-v2 passes all 84 checks in about 62 seconds, and
run_vmtests.sh -t hugetlb passes in 87 seconds. It also passes with
KASAN and lockdep on an mm-new that includes David's "mm/hugetlb:
various fixes (2)" v1. Not tested with cgroup v1 or other huge page
sizes.

Found and fixed with the help of an AI coding assistant.

[1] https://lore.kernel.org/20260714021630.1063823-1-husong@kylinos.cn

---
Kurt Lin (3):
      selftests/mm: don't wait for a hugetlb reservation that is expected to fail
      selftests/mm: don't use killall --wait in charge_reserved_hugetlb.sh
      selftests/mm: fix and enable the multiple cgroups hugetlb tests

Song Hu (1):
      selftests/mm: restore hidden hugetlb reservation scenarios

 .../selftests/mm/charge_reserved_hugetlb.sh        | 62 +++++++++++-----------
 1 file changed, 32 insertions(+), 30 deletions(-)
---
base-commit: 872ceec1e3caf227655a58f7407a9c8493dcf56f
change-id: 20261205-hugetlb-charge-multi-cgroup-c222845080f1

Best regards,
-- 
Kurt Lin <lylin1023@gmail.com>



^ permalink raw reply	[flat|nested] 15+ messages in thread
* + selftests-mm-restore-hidden-hugetlb-reservation-scenarios.patch added to mm-new branch
@ 2026-09-02  0:37 Andrew Morton
  0 siblings, 0 replies; 15+ messages in thread
From: Andrew Morton @ 2026-09-02  0:37 UTC (permalink / raw)
  To: mm-commits, vbabka, surenb, shuah, rppt, osalvador, muchun.song,
	mhocko, ljs, liam, david, almasrymina, akpm, husong, akpm


The patch titled
     Subject: selftests/mm: restore hidden hugetlb reservation scenarios
has been added to the -mm mm-new branch.  Its filename is
     selftests-mm-restore-hidden-hugetlb-reservation-scenarios.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-restore-hidden-hugetlb-reservation-scenarios.patch

This patch will later appear in the mm-new branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews.  Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved
into mm.git's mm-unstable branch, which is included in linux-next

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 various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Song Hu <husong@kylinos.cn>
Subject: selftests/mm: restore hidden hugetlb reservation scenarios
Date: Tue, 14 Jul 2026 10:16:30 +0800

A stray 'continue' in the main loop of charge_reserved_hugetlb.sh made the
"more than reservation", "more than cgroup limit", and "multiple cgroups"
scenarios unreachable, so they never ran.

Remove it so the first two run again.  The third,
run_multiple_cgroup_test(), is separately broken -- a backslash
line-continuation breaks its local declarations and its hugetlb
reservation accounting does not charge as expected -- and has never run in
CI; skip it explicitly with a comment until fixed.  Also correct two `[[
"$method" == 2"" ]]` typos (harmless empty-string concatenation) to plain
`2`.

Link: https://lore.kernel.org/20260714021630.1063823-1-husong@kylinos.cn
Signed-off-by: Song Hu <husong@kylinos.cn>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mina Almasry <almasrymina@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/charge_reserved_hugetlb.sh |   14 +++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

--- a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh~selftests-mm-restore-hidden-hugetlb-reservation-scenarios
+++ a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
@@ -439,11 +439,11 @@ for populate in "" "-o"; do
         fi
 
         # Skip populated shmem tests. Doesn't seem to be supported.
-        if [[ "$method" == 2"" ]] && [[ "$populate" == "-o" ]]; then
+        if [[ "$method" == 2 ]] && [[ "$populate" == "-o" ]]; then
           continue
         fi
 
-        if [[ "$method" == 2"" ]] && [[ "$reserve" == "-n" ]]; then
+        if [[ "$method" == 2 ]] && [[ "$reserve" == "-n" ]]; then
           continue
         fi
 
@@ -496,7 +496,6 @@ for populate in "" "-o"; do
         echo 'PASS'
 
         cleanup
-        continue
         echo
         echo
         echo
@@ -530,6 +529,15 @@ for populate in "" "-o"; do
 
         cleanup
 
+        # The "multiple cgroups" scenario (run_multiple_cgroup_test) is
+        # multiply broken and has never run in CI: a backslash
+        # line-continuation breaks its local declarations, it passes
+        # reservation sizes in bytes rather than pages (unlike
+        # run_test), and its assertions compare page counts to byte
+        # values. Skip it until properly rewritten; the two scenarios
+        # above are restored by this change.
+        continue
+
         echo
         echo
         echo
_

Patches currently in -mm which might be from husong@kylinos.cn are

selftests-mm-emit-tap-header-in-uffd-wp-mremap.patch
selftests-mm-emit-tap-header-and-use-tap-skip-in-mremap_test.patch
selftests-mm-restore-enable_soft_offline-in-hugetlb-soft-offline.patch
selftests-mm-restore-hidden-hugetlb-reservation-scenarios.patch


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-12-05 17:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 17:31 [PATCH 0/4] selftests/mm: run all hugetlb cgroup reservation tests Kurt Lin
2026-12-04 17:31 ` [PATCH 1/4] selftests/mm: don't wait for a hugetlb reservation that is expected to fail Kurt Lin
2026-12-05  8:35   ` + selftests-mm-dont-wait-for-a-hugetlb-reservation-that-is-expected-to-fail.patch added to mm-new branch Andrew Morton
2026-12-05 17:33   ` [PATCH 1/4] selftests/mm: don't wait for a hugetlb reservation that is expected to fail sashiko-bot
2026-12-04 17:31 ` [PATCH 2/4] selftests/mm: don't use killall --wait in charge_reserved_hugetlb.sh Kurt Lin
2026-12-05  8:35   ` + selftests-mm-dont-use-killall-wait-in-charge_reserved_hugetlbsh.patch added to mm-new branch Andrew Morton
2026-12-05 17:33   ` [PATCH 2/4] selftests/mm: don't use killall --wait in charge_reserved_hugetlb.sh sashiko-bot
2026-12-04 17:31 ` [PATCH 3/4] selftests/mm: restore hidden hugetlb reservation scenarios Kurt Lin
2026-12-05  8:35   ` + selftests-mm-restore-hidden-hugetlb-reservation-scenarios.patch added to mm-new branch Andrew Morton
2026-12-05 17:33   ` [PATCH 3/4] selftests/mm: restore hidden hugetlb reservation scenarios sashiko-bot
2026-12-04 17:32 ` [PATCH 4/4] selftests/mm: fix and enable the multiple cgroups hugetlb tests Kurt Lin
2026-12-05  8:35   ` + selftests-mm-fix-and-enable-the-multiple-cgroups-hugetlb-tests.patch added to mm-new branch Andrew Morton
2026-12-05 17:33   ` [PATCH 4/4] selftests/mm: fix and enable the multiple cgroups hugetlb tests sashiko-bot
2026-12-05  8:33 ` [PATCH 0/4] selftests/mm: run all hugetlb cgroup reservation tests Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2026-09-02  0:37 + selftests-mm-restore-hidden-hugetlb-reservation-scenarios.patch added to mm-new branch Andrew Morton

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.