From: Kevin Brodsky <kevin.brodsky@arm.com>
To: "Andrew Morton" <akpm@linux-foundation.org>,
"Carlos López" <clopez@suse.de>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
dave.hansen@linux.intel.com, David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
linux-kselftest@vger.kernel.org,
Muhammad Usama Anjum <usama.anjum@arm.com>,
Joey Gouly <joey.gouly@arm.com>, Hongfu Li <lihongfu@kylinos.cn>
Subject: Re: [PATCH] selftests/mm: pkeys: wait for the child in become_child()
Date: Fri, 13 Nov 2026 11:51:14 +0100 [thread overview]
Message-ID: <827c5b0b-ec80-43bd-abdb-8fce4a8b1df9@arm.com> (raw)
In-Reply-To: <20261106135739.113e4b432ecb6e92f62e37d4@linux-foundation.org>
On 06/11/2026 22:57, Andrew Morton wrote:
> On Fri, 6 Nov 2026 17:46:39 +0100 Carlos López <clopez@suse.de> wrote:
>
>> become_child() forks during test_pkey_alloc_exhaust() and has the parent
>> exit, so that the remaining tests run in the child. However, the test
>> runner only waits for the original process, so it sees the test finish
>> early with a success status while the remaining tests keep running in
>> the background. Failures after the first fork are thus not reported in
>> the exit status, and the remaining tests overlap with the next selftest.
>>
>> Fix this by waiting for the child in the parent and exiting with its
>> status. A previous fix avoided waiting, arguing that the parents would
>> keep holding their resources [1]. Particularly, the parent keeps the
>> hugetlb reservation of its test memory, so the child runs out of hugetlb
>> pages after a few iterations. Avoid this by freeing the test memory
>> before waiting.
> Thanks.
>
>> tools/testing/selftests/mm/protection_keys.c | 16 +++++++++++++---
> get_maintainer coverage of selftests is poor, alas. So it's a good
> idea to poke around in the git-blame output to figure out who best to
> cc. I added four new lucky duckies to this thread.
Thanks, looks sensible to me. These pkeys kselftests really rely on a
lot of (black) magic...
Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com>
next prev parent reply other threads:[~2026-11-13 12:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 16:46 Carlos López
2026-11-06 21:57 ` Andrew Morton
2026-11-13 10:51 ` Kevin Brodsky [this message]
2026-11-09 1:50 ` Hongfu Li
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=827c5b0b-ec80-43bd-abdb-8fce4a8b1df9@arm.com \
--to=kevin.brodsky@arm.com \
--cc=akpm@linux-foundation.org \
--cc=clopez@suse.de \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=joey.gouly@arm.com \
--cc=liam@infradead.org \
--cc=lihongfu@kylinos.cn \
--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=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=tglx@kernel.org \
--cc=usama.anjum@arm.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®