From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,david@redhat.com,ziy@nvidia.com,akpm@linux-foundation.org
Subject: [folded-merged] selftests-mm-reimplement-is_backed_by_thp-with-more-precise-check-fix.patch removed from -mm tree
Date: Sat, 13 Sep 2025 15:23:13 -0700 [thread overview]
Message-ID: <20250913222313.B27C0C4CEEB@smtp.kernel.org> (raw)
The quilt patch titled
Subject: fixup: selftests/mm: use nr_pages instead of 1UL << order
has been removed from the -mm tree. Its filename was
selftests-mm-reimplement-is_backed_by_thp-with-more-precise-check-fix.patch
This patch was dropped because it was folded into selftests-mm-reimplement-is_backed_by_thp-with-more-precise-check.patch
------------------------------------------------------
From: Zi Yan <ziy@nvidia.com>
Subject: fixup: selftests/mm: use nr_pages instead of 1UL << order
Date: Tue, 19 Aug 2025 12:52:13 -0400
reduce code duplication, per David
Link: https://lkml.kernel.org/r/F54782D6-65A3-4D35-AE03-8ADE636EE258@nvidia.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tools/testing/selftests/mm/split_huge_page_test.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/tools/testing/selftests/mm/split_huge_page_test.c~selftests-mm-reimplement-is_backed_by_thp-with-more-precise-check-fix
+++ a/tools/testing/selftests/mm/split_huge_page_test.c
@@ -38,6 +38,7 @@ unsigned int pmd_order;
static bool is_backed_by_folio(char *vaddr, int order, int pagemap_fd,
int kpageflags_fd)
{
+ const unsigned long nr_pages = 1UL << order;
unsigned long pfn_head;
uint64_t pfn_flags;
unsigned long pfn;
@@ -63,7 +64,7 @@ static bool is_backed_by_folio(char *vad
if (!(pfn_flags & KPF_THP))
return false;
- pfn_head = pfn & ~((1 << order) - 1);
+ pfn_head = pfn & ~(nr_pages - 1);
if (pageflags_get(pfn_head, kpageflags_fd, &pfn_flags))
goto fail;
@@ -73,7 +74,7 @@ static bool is_backed_by_folio(char *vad
return false;
/* check all tail PFN flags */
- for (i = 1; i < 1UL << order; i++) {
+ for (i = 1; i < nr_pages; i++) {
if (pageflags_get(pfn_head + i, kpageflags_fd, &pfn_flags))
goto fail;
if (!(pfn_flags & (KPF_THP | KPF_COMPOUND_TAIL)))
@@ -84,7 +85,7 @@ static bool is_backed_by_folio(char *vad
* check the PFN after this folio, but if its flags cannot be obtained,
* assume this folio has the expected order
*/
- if (pageflags_get(pfn_head + (1UL << order), kpageflags_fd, &pfn_flags))
+ if (pageflags_get(pfn_head + nr_pages, kpageflags_fd, &pfn_flags))
return true;
/* this folio is bigger than the given order */
_
Patches currently in -mm which might be from ziy@nvidia.com are
mm-huge_memory-add-new_order-and-offset-to-split_huge_pages-pr_debug.patch
selftests-mm-mark-all-functions-static-in-split_huge_page_testc.patch
selftests-mm-reimplement-is_backed_by_thp-with-more-precise-check.patch
selftests-mm-add-check_after_split_folio_orders-helper.patch
selftests-mm-check-after-split-folio-orders-in-split_huge_page_test.patch
reply other threads:[~2025-09-13 22:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250913222313.B27C0C4CEEB@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=mm-commits@vger.kernel.org \
--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 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.