Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Rama Krishna Katta <ramakrishna.katta@arm.com>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org
Cc: Annam Sai Manisha <Annam.SaiManisha@arm.com>,
	Oscar Salvador <osalvador@suse.de>, Shuah Khan <shuah@kernel.org>,
	linux-cxl@vger.kernel.org
Subject: Re: [PATCH] selftests/mm: improve memory hotplug test reliability
Date: Mon, 30 Nov 2026 12:12:56 +0100	[thread overview]
Message-ID: <8c078bdf-6c85-4dce-b2cc-fa282f1bfe97@kernel.org> (raw)
In-Reply-To: <20261129211101.3568096-1-ramakrishna.katta@arm.com>

On 11/29/26 22:11, Rama Krishna Katta wrote:
> The memory hotplug selftest relies on user-supplied parameters and on the
> removable sysfs attribute when selecting memory blocks to exercise. The
> attribute does not guarantee that a block can actually be offlined, which
> makes the test unreliable when blocks contain unmovable allocations.
> 
> Convert the test to KTAP output and select a bounded set of blocks by
> actually attempting to offline them. Limit each offlining attempt to 10
> seconds, online selected blocks into ZONE_MOVABLE, and skip the test when
> no suitable block is found. Exercise notifier error injection when the
> module is available.
> 
> Preserve each selected block's initial online state and restore it at the
> end of the test or when the test exits early. Limit sysfs discovery to
> numeric memory block directories.
> 
> Register the script as a regular kselftest program and make
> run_full_test an alias for the standard runner.
> 
> Example test results on arm64 vs x86:
> x86:
> 
>   TAP version 13
>   # Trying to offline up to 4 memory block(s):
>   # 1 is already offline
>   # Offlining 102 succeeded
>   # Offlining 105 succeeded
>   # Offlining 106 succeeded
>   1..7
>   # Test scope: 4 memory block(s)
>   ok 1 Online memory to ZONE_MOVABLE
>   ok 2 Offline memory
>   ok 3 Offline memory with error injection
>   ok 4 Offline memory
>   ok 5 Reonline memory with error injection
>   ok 6 Reonline memory with error injection to ZONE_MOVABLE
>   ok 7 Restore memory state
>   # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0
> 
> arm64 (no suitable memory blocks found):
> 
>   TAP version 13
>   # Trying to offline up to 4 memory block(s):
>   # Selected memory blocks:
>   1..0 # SKIP unable to offline any memory
> 
> The x86 run passes all seven tests, including notifier error injection
> and memory-state restoration. The arm64 run skips because no memory
> block could be selected; it does not exercise the seven test cases.
> 

Yes, thanks, this needed a rewrite.

Given that I was involved in the review off-list:

Acked-by: David Hildenbrand (Arm) <david@kernel.org>

I'd appreciate some more review, although it might be hard to motivate people to
review memhp selftests :)

-- 
Cheers,

David

      reply	other threads:[~2026-11-30 11:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 21:11 [PATCH] selftests/mm: improve memory hotplug test reliability Rama Krishna Katta
2026-11-30 11:12 ` David Hildenbrand (Arm) [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=8c078bdf-6c85-4dce-b2cc-fa282f1bfe97@kernel.org \
    --to=david@kernel.org \
    --cc=Annam.SaiManisha@arm.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=ramakrishna.katta@arm.com \
    --cc=shuah@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