linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/mm/thp_swap_allocator_test: Fix small folio alignment
@ 2025-12-09  3:17 Kaushlendra Kumar
  2025-12-16  3:31 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushlendra Kumar @ 2025-12-09  3:17 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, Kaushlendra Kumar

Use ALIGNMENT_SMALLFOLIO instead of ALIGNMENT_MTHP when allocating
small folios to ensure correct memory alignment for the test case.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
---
 tools/mm/thp_swap_allocator_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mm/thp_swap_allocator_test.c b/tools/mm/thp_swap_allocator_test.c
index 83afc52275a5..d4434df3dcff 100644
--- a/tools/mm/thp_swap_allocator_test.c
+++ b/tools/mm/thp_swap_allocator_test.c
@@ -142,7 +142,7 @@ int main(int argc, char *argv[])
 	}
 
 	if (use_small_folio) {
-		mem2 = aligned_alloc_mem(MEMSIZE_SMALLFOLIO, ALIGNMENT_MTHP);
+		mem2 = aligned_alloc_mem(MEMSIZE_SMALLFOLIO, ALIGNMENT_SMALLFOLIO);
 		if (mem2 == NULL) {
 			fprintf(stderr, "Failed to allocate small folios memory\n");
 			free(mem1);
-- 
2.34.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-18  3:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-09  3:17 [PATCH] tools/mm/thp_swap_allocator_test: Fix small folio alignment Kaushlendra Kumar
2025-12-16  3:31 ` Andrew Morton
2025-12-18  3:04   ` Kumar, Kaushlendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox