All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] tools-mm-thp_swap_allocator_test-fix-small-folio-alignment.patch removed from -mm tree
@ 2026-01-21  3:27 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-01-21  3:27 UTC (permalink / raw)
  To: mm-commits, akpm, kaushlendra.kumar, akpm


The quilt patch titled
     Subject: tools/mm/thp_swap_allocator_test: fix small folio alignment
has been removed from the -mm tree.  Its filename was
     tools-mm-thp_swap_allocator_test-fix-small-folio-alignment.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Subject: tools/mm/thp_swap_allocator_test: fix small folio alignment
Date: Tue, 9 Dec 2025 08:47:45 +0530

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

Before: test allocates small folios with 64KB alignment
(ALIGNMENT_MTHP) when only 4KB alignment (ALIGNMENT_SMALLFOLIO) is
needed.  This wastes address space and may cause allocation failures on
systems with fragmented memory.

Worst-case impact: this only affects thp_swap_allocator_test tool
behavior.

Link: https://lkml.kernel.org/r/20251209031745.2723120-1-kaushlendra.kumar@intel.com
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/mm/thp_swap_allocator_test.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tools/mm/thp_swap_allocator_test.c~tools-mm-thp_swap_allocator_test-fix-small-folio-alignment
+++ a/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);
_

Patches currently in -mm which might be from kaushlendra.kumar@intel.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-21  3:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-21  3:27 [merged mm-stable] tools-mm-thp_swap_allocator_test-fix-small-folio-alignment.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.