From: Donet Tom <donettom@linux.ibm.com>
To: Dev Jain <dev.jain@arm.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
Shuah Khan <shuah@kernel.org>
Cc: Ritesh Harjani <ritesh.list@gmail.com>,
longman@redhat.com, Li Wang <liwang@redhat.com>
Subject: Re: [PATCH] selftests/mm: Restore default nr_hugepages value during cleanup in hugetlb_reparenting_test.sh
Date: Tue, 15 Apr 2025 15:48:09 +0530 [thread overview]
Message-ID: <9b1c3acc-6d7e-46a2-9d47-b41933bd40ac@linux.ibm.com> (raw)
In-Reply-To: <7aa6ff41-6ec4-4750-8a0f-f43fe2c1b549@arm.com>
On 4/15/25 1:00 PM, Dev Jain wrote:
>
>
> On 15/04/25 12:28 pm, Anshuman Khandual wrote:
>>
>>
>> On 4/10/25 15:37, Donet Tom wrote:
>>> During cleanup, the value of /proc/sys/vm/nr_hugepages is currently
>>> being set to 0. At the end of the test, if all tests pass, the
>>> original nr_hugepages value is restored. However, if any test fails,
>>> it remains set to 0.
>>>
>>> With this patch, we ensure that the original nr_hugepages value is
>>> restored during cleanup, regardless of whether the test passes or
>>> fails.
>>>
>>> Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation
>>> tests")
>> Although this change makes sense as an improvement or a cleanup but
>> not sure if this also deserves a Fixes: tag as well.
>
> IMHO it deserves a Fixes tag, the tests should always cleanly exit
> without changing system state. It may or may not cause an actual
> problem, so let's be proactive : )
>
Yes, I was thinking the same.
>
>>
>>> Signed-off-by: Donet Tom <donettom@linux.ibm.com>
>>> ---
>>> tools/testing/selftests/mm/hugetlb_reparenting_test.sh | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/testing/selftests/mm/hugetlb_reparenting_test.sh
>>> b/tools/testing/selftests/mm/hugetlb_reparenting_test.sh
>>> index 11f9bbe7dc22..114875a2b018 100755
>>> --- a/tools/testing/selftests/mm/hugetlb_reparenting_test.sh
>>> +++ b/tools/testing/selftests/mm/hugetlb_reparenting_test.sh
>>> @@ -56,7 +56,7 @@ function cleanup() {
>>> rmdir "$CGROUP_ROOT"/a/b 2>/dev/null
>>> rmdir "$CGROUP_ROOT"/a 2>/dev/null
>>> rmdir "$CGROUP_ROOT"/test1 2>/dev/null
>>> - echo 0 >/proc/sys/vm/nr_hugepages
>>> + echo $nr_hugepgs >/proc/sys/vm/nr_hugepages
>>> set -e
>>> }
>>
>
>
prev parent reply other threads:[~2025-04-15 10:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 10:07 Donet Tom
2025-04-15 6:58 ` Anshuman Khandual
2025-04-15 7:30 ` Dev Jain
2025-04-15 10:18 ` Donet Tom [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=9b1c3acc-6d7e-46a2-9d47-b41933bd40ac@linux.ibm.com \
--to=donettom@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=dev.jain@arm.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liwang@redhat.com \
--cc=longman@redhat.com \
--cc=ritesh.list@gmail.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