linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (Oracle)" <ljs@kernel.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Breno Leitao <leitao@debian.org>,
	 "David Hildenbrand (Arm)" <david@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	 "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Vlastimil Babka <vbabka@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
	 linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org,  kernel-team@meta.com
Subject: Re: [PATCH] selftests/mm: add THP sysfs interface test
Date: Tue, 17 Mar 2026 08:45:24 +0000	[thread overview]
Message-ID: <51a4855d-89cf-49e7-bd4f-f0ba13f23102@lucifer.local> (raw)
In-Reply-To: <abjqDUpkezMfvCHz@kernel.org>

On Tue, Mar 17, 2026 at 07:43:41AM +0200, Mike Rapoport wrote:
> On Mon, Mar 16, 2026 at 07:53:46PM +0000, Lorenzo Stoakes (Oracle) wrote:
> > On Mon, Mar 16, 2026 at 09:02:33AM -0700, Breno Leitao wrote:
> > > On Mon, Mar 16, 2026 at 03:44:14PM +0100, David Hildenbrand (Arm) wrote:
> > > > On 3/16/26 14:47, Breno Leitao wrote:
> > > > > On Mon, Mar 16, 2026 at 12:55:13PM +0000, Lorenzo Stoakes (Oracle) wrote:
> > > > >> On Mon, Mar 09, 2026 at 05:00:34AM -0700, Breno Leitao wrote:
> > > > >>> Add a shell-based selftest that exercises the full set of THP sysfs
> > > > >>> knobs: enabled (global and per-size anon), defrag, use_zero_page,
> > > > >>> hpage_pmd_size, shmem_enabled (global and per-size), shrink_underused,
> > > > >>> khugepaged/ tunables, and per-size stats files.
> > > > >>>
> > > > >>> Each writable knob is tested for valid writes, invalid-input rejection,
> > > > >>> idempotent writes, and mode transitions where applicable. All original
> > > > >>> values are saved before testing and restored afterwards.
> > > > >>>
> > > > >>> The test uses the kselftest KTAP framework (ktap_helpers.sh) for
> > > > >>> structured TAP 13 output, making results parseable by the kselftest
> > > > >>> harness. The test plan is printed at the end since the number of test
> > > > >>> points is dynamic (depends on available hugepage sizes and sysfs files).
> > > > >>>
> > > > >>> This is particularly useful for validating the refactoring of
> > > > >>> enabled_store() and anon_enabled_store() to use sysfs_match_string()
> > > > >>> and the new change_enabled()/change_anon_orders() helpers.
> > > > >>>
> > > > >>> Signed-off-by: Breno Leitao <leitao@debian.org>
> > > > >>
> > > > >> The test is broken locally for me, returning error code 127.
> > > > >>
> > > > >> I do appreciate the effort here, so I'm sorry to push back negatively, but I
> > > > >> feel a bash script here is pretty janky, and frankly if any of these interfaces
> > > > >> were as broken as this it'd be a major failure that would surely get picked up
> > > > >> far sooner elsewhere.
> > > > >>
> > > > >> So while I think this might be useful as a local test for your sysfs interface
> > > > >> changes, I don't think this is really suited to the mm selftests.
> > > > >
> > > > > That is totally fine. This test is what I have been using to test the
> > > > > changes, and I decide to share it in case someone find it useful.
> > > > >
> > > > > Let's drop it.
> > > >
> > > > Out of interest, to we know why the test is failing for Lorenzo?
> > >
> > > I really don't know, but, it sounds like ktap was not found?
> >
> > Yeah CONFIG_KUNIT is not set so could be :)
>
> Nah, CONFIG_KUNIT has nothing to do with ktap_helpers.sh, probably your
> environment does not bring in tools/testing/selftests/kselftest

Yeah I copy the mm tests to /mnt in vng before running to avoid ro
filesystem issues.

Not a fan of us relying on the entire tree structure being there either
then :)

Cheers, Lorenzo


      reply	other threads:[~2026-03-17  8:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 12:00 Breno Leitao
2026-03-16 12:55 ` Lorenzo Stoakes (Oracle)
2026-03-16 13:47   ` Breno Leitao
2026-03-16 14:44     ` David Hildenbrand (Arm)
2026-03-16 16:02       ` Breno Leitao
2026-03-16 19:53         ` Lorenzo Stoakes (Oracle)
2026-03-17  5:43           ` Mike Rapoport
2026-03-17  8:45             ` Lorenzo Stoakes (Oracle) [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=51a4855d-89cf-49e7-bd4f-f0ba13f23102@lucifer.local \
    --to=ljs@kernel.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --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