mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kurt Lin <lylin1023@gmail.com>
To: Mike Rapoport <rppt@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Song Hu <husong@kylinos.cn>,
	Mina Almasry <almasrymina@google.com>,
	David Hildenbrand <david@kernel.org>,
	muchun.song@linux.dev, osalvador@suse.de, ljs@kernel.org,
	liam@infradead.org, vbabka@kernel.org, surenb@google.com,
	mhocko@suse.com, shuah@kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] selftests/mm: restore hidden hugetlb reservation scenarios
Date: Mon, 23 Nov 2026 23:09:58 +0800	[thread overview]
Message-ID: <20261123150958.2212229-1-lylin1023@gmail.com> (raw)
In-Reply-To: <apqBn7tWDHQeMrzB@kernel.org>

On Fri, Sep 04, 2026 at 11:30:23AM +0300, Mike Rapoport wrote:
> And this code breaks our CI e.g:
>
> https://github.com/linux-mm/linux-mm/actions/runs/33040981840/job/98414290236

The hugetlb category in that run hit its 300 s timeout inside
charge_reserved_hugetlb.sh.

With the stray 'continue' gone, the "more than reservation" and "more
than cgroup limit" cases run. They expect the write to fail, but
write_hugetlbfs_and_get_usage() still waits for the full reservation,
so most of these cases spend 60 s in wait_for_file_value() before
moving on. The CI log shows this: hugetlb.2MB.rsvd.current stays at 0
for 60 polls in three cases, and the run is killed during the fourth.

Skipping the wait when a failure is expected, on top of this patch:

--- a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
+++ b/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
@@ -252,7 +252,7 @@ function write_hugetlbfs_and_get_usage() {
       "$cgroup" "$path" "$method" "$private" "$reserve"
     local write_result=$?
 
-    if [[ "$reserve" != "-n" ]]; then
+    if [[ "$reserve" != "-n" ]] && [[ "$expect_failure" != 1 ]]; then
       wait_for_hugetlb_memory_to_get_reserved "$cgroup" "$size"
     fi
   fi

takes the script from over 600 s to 64 s in a virtme-ng guest, with
all 56 cases passing (only 28 ran before), and run_vmtests.sh -t
hugetlb to 83 s.

Song, would you like to fold this into a v2, or should I send it as a
separate patch?

I found and tested this with the help of an AI coding assistant.

      parent reply	other threads:[~2026-11-23 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  2:16 Song Hu
2026-09-02  0:37 ` Andrew Morton
2026-09-04  8:30   ` Mike Rapoport
2026-09-04 17:48     ` Andrew Morton
2026-09-05  8:17       ` David Hildenbrand (Arm)
2026-09-06  8:28         ` Mike Rapoport
2026-11-23 15:09     ` Kurt Lin [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=20261123150958.2212229-1-lylin1023@gmail.com \
    --to=lylin1023@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=david@kernel.org \
    --cc=husong@kylinos.cn \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@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

all inboxes | Powered by JetHome®