Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Kurt Lin <lylin1023@gmail.com>
Cc: David Hildenbrand <david@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
	Shuah Khan <shuah@kernel.org>,
	Mina Almasry <almasrymina@google.com>,
	Sayali Patil <sayalip@linux.ibm.com>, Zi Yan <ziy@nvidia.com>,
	Song Hu <husong@kylinos.cn>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, Li Wang <li.wang@linux.dev>
Subject: Re: [PATCH 0/4] selftests/mm: run all hugetlb cgroup reservation tests
Date: Sat, 5 Dec 2026 00:33:59 -0800	[thread overview]
Message-ID: <20261205003359.261a676af447f5e8d90ef790@linux-foundation.org> (raw)
In-Reply-To: <20261205-hugetlb-charge-multi-cgroup-v1-0-e88105afc12a@gmail.com>

On Sat, 05 Dec 2026 01:31:56 +0800 Kurt Lin <lylin1023@gmail.com> wrote:

> 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.

argh, this thing.  60 seconds isn't acceptable for a selftest! 
selftests are to test kernel functionality and nothing else.  No stress
testing, no performance testing.  In, check, out, done.

I'll grab these 4 on the grounds that they take the situation from
"utterly awful" to merely "really bad", but tokenbot tells me that all
this functionality (plus the functionality which the script fails to
check) can be tested in about 1 second.



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

I told it

: That script takes about a minute to run whch is not acceptable for a
; selftest.  Selftests are to test kernel fuctionality and nothing else. 
: No stress tests, no performance tests.
:
: I want you to figure out what kernel functionality that thing is
: testing then propose a replacement C program which tests the same
: functionality in a few seconds.  Don't write anything yet - just scope
: out the work.

then

: Is there additional related functionality which this script should test
: but fails to so do?

Result: it's not a trivial project.  Numerous design-level decisions
must be made which will require understanding of the APIs which are
being tested and, in some cases, of their internal implementation
details.

And the "internal implementation details" part is problematic.  Those
things can change and we shouldn't implement tests which are designed
to match observed current-kernel behavior!  The tests should test the
interface as we designed it and as we documented it and as we expect
userspace to use it.

> Not tested with cgroup v1 or other huge page sizes.

That would need to change ;)


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

Thread overview: 10+ 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 17:33   ` 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 17:33   ` sashiko-bot
2026-12-04 17:31 ` [PATCH 3/4] selftests/mm: restore hidden hugetlb reservation scenarios Kurt Lin
2026-12-05 17:33   ` 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 17:33   ` sashiko-bot
2026-12-05  8:33 ` Andrew Morton [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=20261205003359.261a676af447f5e8d90ef790@linux-foundation.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=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lylin1023@gmail.com \
    --cc=mhocko@suse.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox