diff options
| author | Sayali Patil <sayalip@linux.ibm.com> | 2026-05-21 09:47:43 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-06-21 21:37:32 +0300 |
| commit | 7f9c0920ff3debae3cb4d60260e3daf56ab68395 (patch) | |
| tree | ae53e528ff90707bf7d1b4013f13247375a7bd21 /scripts/Makefile.thinlto | |
| parent | 404c04e010da2edc93cada07d4d50deda12a68e4 (diff) | |
| download | linux-7f9c0920ff3debae3cb4d60260e3daf56ab68395.tar.xz | |
selftests/mm: restore default nr_hugepages value via exit trap in hugetlb_reparenting_test.sh
The test modifies nr_hugepages during execution and restores it from
cleanup() and again reconfigure it setup, which is invoked multiple times
across test flow. This can lead to repeated allocation/freeing of
hugepages.
With set -e, failures in cleanup (e.g., rmdir/umount) can also cause early
exit before restoring the original value at the end.
Move restoration of the original nr_hugepages value to a trap handler
registered for EXIT, INT, and TERM signals so it is always restored on all
exit paths. This also avoids unnecessary allocation churn across repeated
cleanup/setup cycles.
Link: https://lore.kernel.org/29db637c3c6ba6c168f6b33f59f059a0b39c35c8.1779296493.git.sayalip@linux.ibm.com
Fixes: 585a9145886a ("selftests/mm: restore default nr_hugepages value during cleanup in hugetlb_reparenting_test.sh")
Signed-off-by: Sayali Patil <sayalip@linux.ibm.com>
Acked-by: Zi Yan <ziy@nvidia.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Cc: David Hildenbrand (Arm) <david@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
