Skip to content

Commit 04dfc21

Browse files
Sayali Patilgregkh
authored andcommitted
selftests/mm: clarify alternate unmapping in compaction_test
[ Upstream commit 69ba1d7 ] Add a comment explaining that every other entry in the list is unmapped to intentionally create fragmentation with locked pages before invoking check_compaction(). Link: https://lore.kernel.org/da5e0a8d5152e54152c0d2f456aac2fac35af291.1779296493.git.sayalip@linux.ibm.com Fixes: bd67d5c ("Test compaction of mlocked memory") Signed-off-by: Sayali Patil <sayalip@linux.ibm.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> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent b508e75 commit 04dfc21

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tools/testing/selftests/mm/compaction_test.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ int main(int argc, char **argv)
234234
mem_fragmentable_MB -= MAP_SIZE_MB;
235235
}
236236

237+
/* Unmap every other entry in the list to create fragmentation with
238+
* locked pages before invoking check_compaction().
239+
*/
237240
for (entry = list; entry != NULL; entry = entry->next) {
238241
munmap(entry->map, MAP_SIZE);
239242
if (!entry->next)

0 commit comments

Comments
 (0)