From: Sayali Patil <sayalip@linux.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Ritesh Harjani <ritesh.list@gmail.com>
Cc: David Hildenbrand <david@kernel.org>, Zi Yan <ziy@nvidia.com>,
Michal Hocko <mhocko@kernel.org>,
Oscar Salvador <osalvador@suse.de>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Dev Jain <dev.jain@arm.com>,
Liam.Howlett@oracle.com, linuxppc-dev@lists.ozlabs.org,
Miaohe Lin <linmiaohe@huawei.com>,
Venkat Rao Bagalkote <venkat88@linux.ibm.com>,
Sayali Patil <sayalip@linux.ibm.com>
Subject: [PATCH v6 14/14] selftests/mm: clarify alternate unmapping in compaction_test
Date: Mon, 4 May 2026 13:54:51 +0530 [thread overview]
Message-ID: <91e4eb8e0d0b5a27e166eca59fd7750fe6e34036.1777877814.git.sayalip@linux.ibm.com> (raw)
In-Reply-To: <cover.1777877814.git.sayalip@linux.ibm.com>
Add a comment explaining that every other entry in the list is
unmapped to intentionally create fragmentation with
locked pages before invoking check_compaction().
Fixes: bd67d5c15cc1 ("Test compaction of mlocked memory")
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Sayali Patil <sayalip@linux.ibm.com>
---
tools/testing/selftests/mm/compaction_test.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c
index 30209c40b697..e1610e2fbdf6 100644
--- a/tools/testing/selftests/mm/compaction_test.c
+++ b/tools/testing/selftests/mm/compaction_test.c
@@ -261,6 +261,9 @@ int main(int argc, char **argv)
mem_fragmentable_MB -= MAP_SIZE_MB;
}
+ /* Unmap every other entry in the list to create fragmentation with
+ * locked pages before invoking check_compaction().
+ */
for (entry = list; entry != NULL; entry = entry->next) {
munmap(entry->map, MAP_SIZE);
if (!entry->next)
--
2.52.0
prev parent reply other threads:[~2026-05-04 8:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 8:24 [PATCH v6 00/14] selftests/mm: fix failures and robustness improvements Sayali Patil
2026-05-04 8:24 ` [PATCH v6 01/14] selftests/mm: restore default nr_hugepages value via exit trap in charge_reserved_hugetlb.sh Sayali Patil
2026-05-04 8:24 ` [PATCH v6 02/14] selftests/mm: fix hugetlb pathname construction " Sayali Patil
2026-05-04 8:24 ` [PATCH v6 03/14] selftests/mm: restore default nr_hugepages value via exit trap in hugetlb_reparenting_test.sh Sayali Patil
2026-05-04 8:24 ` [PATCH v6 04/14] selftests/mm: fix hugetlb pathname construction " Sayali Patil
2026-05-04 8:24 ` [PATCH v6 05/14] selftests/mm: fix cgroup task placement and drop memory.current checks " Sayali Patil
2026-05-04 8:24 ` [PATCH v6 06/14] selftests/mm: size tmpfs according to PMD page size in split_huge_page_test Sayali Patil
2026-05-04 8:24 ` [PATCH v6 07/14] selftests/mm: free dynamically allocated PMD-sized buffers " Sayali Patil
2026-05-04 8:24 ` [PATCH v6 08/14] selftest/mm: align memory size to huge page size in hugepage-mremap test Sayali Patil
2026-05-04 8:24 ` [PATCH v6 09/14] selftest/mm: register existing mapping with userfaultfd in hugepage-mremap Sayali Patil
2026-05-04 8:24 ` [PATCH v6 10/14] selftests/mm: ensure destination is hugetlb-backed " Sayali Patil
2026-05-04 8:24 ` [PATCH v6 11/14] selftests/mm: skip uffd-wp-mremap if UFFD write-protect is unsupported Sayali Patil
2026-05-04 8:24 ` [PATCH v6 12/14] selftests/mm: skip uffd-stress test when nr_pages_per_cpu is zero Sayali Patil
2026-05-04 8:24 ` [PATCH v6 13/14] selftests/mm: move hwpoison setup into run_test() and silence modprobe output for memory-failure category Sayali Patil
2026-05-04 8:24 ` Sayali Patil [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=91e4eb8e0d0b5a27e166eca59fd7750fe6e34036.1777877814.git.sayalip@linux.ibm.com \
--to=sayalip@linux.ibm.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@kernel.org \
--cc=osalvador@suse.de \
--cc=ritesh.list@gmail.com \
--cc=shuah@kernel.org \
--cc=venkat88@linux.ibm.com \
--cc=ziy@nvidia.com \
/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