From: Andrew Morton <akpm@linux-foundation.org>
To: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] tools/mm/thp_swap_allocator_test: Fix small folio alignment
Date: Mon, 15 Dec 2025 19:31:23 -0800 [thread overview]
Message-ID: <20251215193123.1cd0bee80853599220a82ef1@linux-foundation.org> (raw)
In-Reply-To: <20251209031745.2723120-1-kaushlendra.kumar@intel.com>
On Tue, 9 Dec 2025 08:47:45 +0530 Kaushlendra Kumar <kaushlendra.kumar@intel.com> wrote:
> Use ALIGNMENT_SMALLFOLIO instead of ALIGNMENT_MTHP when allocating
> small folios to ensure correct memory alignment for the test case.
>
> ...
>
> --- 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);
What are the worst-case userspace visible runtime effects of this change?
Thanks.
next prev parent reply other threads:[~2025-12-16 3:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 3:17 Kaushlendra Kumar
2025-12-16 3:31 ` Andrew Morton [this message]
2025-12-18 3:04 ` Kumar, Kaushlendra
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=20251215193123.1cd0bee80853599220a82ef1@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=kaushlendra.kumar@intel.com \
--cc=linux-mm@kvack.org \
/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