All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,ziy@nvidia.com,vbabka@kernel.org,
	shuah@kernel.org,sayalip@linux.ibm.com,rppt@kernel.org,mhocko@suse.com,
	li.wang@linux.dev,liam@infradead.org,husong@kylinos.cn,david@kernel.org,
	almasrymina@google.com,lylin1023@gmail.com,akpm@linux-foundation.org
Subject: + selftests-mm-dont-use-killall-wait-in-charge_reserved_hugetlbsh.patch added to mm-new branch
Date: Sat, 05 Dec 2026 00:35:52 -0800	[thread overview]
Message-ID: <20261205083552.894991F00936@smtp.kernel.org> (raw)
In-Reply-To: <20261205-hugetlb-charge-multi-cgroup-v1-2-e88105afc12a@gmail.com>


The patch titled
     Subject: selftests/mm: don't use killall --wait in charge_reserved_hugetlb.sh
has been added to the -mm mm-new branch.  Its filename is
     selftests-mm-dont-use-killall-wait-in-charge_reserved_hugetlbsh.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-dont-use-killall-wait-in-charge_reserved_hugetlbsh.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: Kurt Lin <lylin1023@gmail.com>
Subject: selftests/mm: don't use killall --wait in charge_reserved_hugetlb.sh
Date: Sat, 05 Dec 2026 01:31:58 +0800

killall --wait checks only once a second whether the processes are
gone, so each cleanup of a write_to_hugetlbfs process costs about a
second, although it exits right away on SIGINT.

Poll with pgrep every 0.1 seconds instead. With all test cases enabled,
this cuts charge_reserved_hugetlb.sh -cgroup-v2 from 144 to 62 seconds
in a virtme-ng guest.

Link: https://patch.msgid.link/20261205-hugetlb-charge-multi-cgroup-v1-2-e88105afc12a@gmail.com
Signed-off-by: Kurt Lin <lylin1023@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Sayali Patil <sayalip@linux.ibm.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Song Hu <husong@kylinos.cn>
Cc: Li Wang <li.wang@linux.dev>

 tools/testing/selftests/mm/charge_reserved_hugetlb.sh |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh~selftests-mm-dont-use-killall-wait-in-charge_reserved_hugetlbsh
+++ a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
@@ -286,7 +286,10 @@ function cleanup_hugetlb_memory() {
   local cgroup="$1"
   if [[ "$(pgrep -f write_to_hugetlbfs)" != "" ]]; then
     echo killing write_to_hugetlbfs
-    killall -2 --wait write_to_hugetlbfs
+    killall -2 write_to_hugetlbfs
+    while pgrep -f write_to_hugetlbfs > /dev/null; do
+      sleep 0.1
+    done
     wait_for_hugetlb_memory_to_get_depleted $cgroup
   fi
   set -e
_

Patches currently in -mm which might be from lylin1023@gmail.com are

selftests-mm-dont-wait-for-a-hugetlb-reservation-that-is-expected-to-fail.patch
selftests-mm-dont-use-killall-wait-in-charge_reserved_hugetlbsh.patch
selftests-mm-fix-and-enable-the-multiple-cgroups-hugetlb-tests.patch


  reply	other threads:[~2026-12-05  8:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Andrew Morton [this message]
2026-12-05 17:33   ` 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

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=20261205083552.894991F00936@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=david@kernel.org \
    --cc=husong@kylinos.cn \
    --cc=li.wang@linux.dev \
    --cc=liam@infradead.org \
    --cc=lylin1023@gmail.com \
    --cc=mhocko@suse.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=rppt@kernel.org \
    --cc=sayalip@linux.ibm.com \
    --cc=shuah@kernel.org \
    --cc=vbabka@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 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.