Skip to contentSkip to conversation

+ mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix.patch added to mm-hotfixes-unstable branch

PATCH Andrew Morton 2 participants 2 messages Aug 28 – Aug 29

Subsystems (2)
lore
Share & tools
lore

Andrew Morton

author maintainer tree notice
#0 lore raw

The patch titled
Subject: mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix.patch

This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Andrew Morton <[email protected]>
Subject: mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix
Date: Fri Aug 28 10:35:55 AM PDT 2026

s/vma_check_thp_tuneables_file/vma_file_check_thp_tuneables/, per Zi Yan

Cc Baolin Wang <[email protected]>
Cc Barry Song <[email protected]>
Cc Cedric Le Goater <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Dev Jain <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Lance Yang <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc "Lorenzo Stoakes (ARM)" <[email protected]>
Cc Peter Xu <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Saravanan D <[email protected]>
Cc Zi Yan <[email protected]>

---

 mm/huge_memory.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix +2 -2
@@ -143,7 +143,7 @@ static bool vma_thp_tuneables_allow_file
 	return false;
 }
 
-static bool vma_check_thp_tuneables_file(const struct vm_area_struct *vma,
+static bool vma_file_check_thp_tuneables(const struct vm_area_struct *vma,
 		vm_flags_t vm_flags, enum tva_type type)
 {
 	return vma_bypass_thp_tuneables_file(vma, type) ||
@@ -159,7 +159,7 @@ static bool vma_can_map_huge_file(const
 	 * Enforce THP collapse requirements as necessary. Anonymous vmas
 	 * were already handled in thp_vma_allowable_orders().
 	 */
-	if (!vma_check_thp_tuneables_file(vma, vm_flags, type))
+	if (!vma_file_check_thp_tuneables(vma, vm_flags, type))
 		return false;
 
 	switch (type) {

_

Patches currently in -mm which might be from [email protected] are

mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix.patch drivers-media-v4l2-core-v4l2-vp9c-reduce-inlining.patch

reviewer
#1 lore raw
Quoted 18 lines · Andrew Morton

The patch titled
Subject: mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix.patch

This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

Quoted 6 lines

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

Hi Andrew,

The patch below is what I suggested. Lorenzo, could you let me know if you are OK with it. Thanks.

From 94d78f3d6ba2c1acb841535f934eeef4053c531c Mon Sep 17 00:00:00 2001
From: Zi Yan <[email protected]>
Date: Sat, 29 Aug 2026 10:02:02 -0400
Subject: [PATCH] renames for Lorenzo's
mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings patch

---
 mm/huge_memory.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
mm/huge_memory.c +6 -6
index 4bf7b670586df..1e5d68acf62a5 100644
@@ -118,7 +118,7 @@ static bool vma_is_special_huge(const struct vm_area_struct *vma)
 	return vma_test_any(vma, VMA_PFNMAP_BIT, VMA_MIXEDMAP_BIT);
 }
 
-static bool vma_bypass_thp_tuneables_file(const struct vm_area_struct *vma,
+static bool vma_file_bypass_thp_tuneables(const struct vm_area_struct *vma,
 		enum tva_type type)
 {
 	const bool has_huge_fault = vma->vm_ops->huge_fault;
@@ -132,7 +132,7 @@ static bool vma_bypass_thp_tuneables_file(const struct vm_area_struct *vma,
 	return false;
 }
 
-static bool vma_thp_tuneables_allow_file(vm_flags_t vm_flags)
+static bool vma_file_allow_thp_tuneables(vm_flags_t vm_flags)
 {
 	/* THP=always? */
 	if (hugepage_global_always())
@@ -143,11 +143,11 @@ static bool vma_thp_tuneables_allow_file(vm_flags_t vm_flags)
 	return false;
 }
 
-static bool vma_check_thp_tuneables_file(const struct vm_area_struct *vma,
+static bool vma_file_check_thp_tuneables(const struct vm_area_struct *vma,
 		vm_flags_t vm_flags, enum tva_type type)
 {
-	return vma_bypass_thp_tuneables_file(vma, type) ||
-		vma_thp_tuneables_allow_file(vm_flags);
+	return vma_file_bypass_thp_tuneables(vma, type) ||
+		vma_file_allow_thp_tuneables(vm_flags);
 }
 
 static bool vma_can_map_huge_file(const struct vm_area_struct *vma,
@@ -159,7 +159,7 @@ static bool vma_can_map_huge_file(const struct vm_area_struct *vma,
 	 * Enforce THP collapse requirements as necessary. Anonymous vmas
 	 * were already handled in thp_vma_allowable_orders().
 	 */
-	if (!vma_check_thp_tuneables_file(vma, vm_flags, type))
+	if (!vma_file_check_thp_tuneables(vma, vm_flags, type))
 		return false;
 
 	switch (type) {
Signature · 1 line
2.53.0
Quoted 52 lines

------------------------------------------------------
From: Andrew Morton <[email protected]>
Subject: mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix
Date: Fri Aug 28 10:35:55 AM PDT 2026

s/vma_check_thp_tuneables_file/vma_file_check_thp_tuneables/, per Zi Yan

Cc Baolin Wang <[email protected]>
Cc Barry Song <[email protected]>
Cc Cedric Le Goater <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Dev Jain <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Lance Yang <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc "Lorenzo Stoakes (ARM)" <[email protected]>
Cc Peter Xu <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Saravanan D <[email protected]>
Cc Zi Yan <[email protected]>

---

 mm/huge_memory.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix +2 -2
@@ -143,7 +143,7 @@ static bool vma_thp_tuneables_allow_file
 	return false;
 }
 
-static bool vma_check_thp_tuneables_file(const struct vm_area_struct *vma,
+static bool vma_file_check_thp_tuneables(const struct vm_area_struct *vma,
 		vm_flags_t vm_flags, enum tva_type type)
 {
 	return vma_bypass_thp_tuneables_file(vma, type) ||
@@ -159,7 +159,7 @@ static bool vma_can_map_huge_file(const
 	 * Enforce THP collapse requirements as necessary. Anonymous vmas
 	 * were already handled in thp_vma_allowable_orders().
 	 */
-	if (!vma_check_thp_tuneables_file(vma, vm_flags, type))
+	if (!vma_file_check_thp_tuneables(vma, vm_flags, type))
 		return false;
 
 	switch (type) {

_

Patches currently in -mm which might be from [email protected] are

mm-huge_memory-bypass-thp-tuneables-for-huge-pfnmap-mappings-fix.patch drivers-media-v4l2-core-v4l2-vp9c-reduce-inlining.patch

Signature · 2 lines
Best Regards,
Yan, Zi