Skip to contentSkip to conversation

mm-thp-kill-transparent_hugepage_active.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 18, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: thp: kill transparent_hugepage_active()
has been removed from the -mm tree. Its filename was
mm-thp-kill-transparent_hugepage_active.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: Yang Shi <[email protected]>
Subject: mm: thp: kill transparent_hugepage_active()
Date: Thu, 16 Jun 2022 10:48:37 -0700

The transparent_hugepage_active() was introduced to show THP eligibility bit in smaps in proc, smaps is the only user. But it actually does the similar check as hugepage_vma_check() which is used by khugepaged. We definitely don't have to maintain two similar checks, so kill transparent_hugepage_active().

This patch also fixed the wrong behavior for VM_NO_KHUGEPAGED vmas.

Also move hugepage_vma_check() to huge_memory.c and huge_mm.h since it is not only for khugepaged anymore.

[[email protected]: check vma->vm_mm, per Zach]
[[email protected]: add comment to vdso check]
Cc Kirill A. Shutemov <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Miaohe Lin <[email protected]>
Cc Vlastimil Babka <[email protected]>

---

 fs/proc/task_mmu.c         |    2 -
 include/linux/huge_mm.h    |   16 ++++++----
 include/linux/khugepaged.h |    2 -
 mm/huge_memory.c           |   53 +++++++++++++++++++++++++++++------
 mm/khugepaged.c            |   48 ++-----------------------------
 5 files changed, 59 insertions(+), 62 deletions(-)
fs/proc/task_mmu.c renamed from fs/proc/task_mmu.c~mm-thp-kill-transparent_hugepage_active +1 -1
@@ -863,7 +863,7 @@ static int show_smap(struct seq_file *m,
 	__show_smap(m, &mss, false);
 
 	seq_printf(m, "THPeligible:    %d\n",
-		   transparent_hugepage_active(vma));
+		   hugepage_vma_check(vma, vma->vm_flags, true));
 
 	if (arch_pkeys_enabled())
 		seq_printf(m, "ProtectionKey:  %8u\n", vma_pkey(vma));
include/linux/huge_mm.h renamed from include/linux/huge_mm.h~mm-thp-kill-transparent_hugepage_active +10 -6
@@ -202,7 +202,9 @@ static inline bool file_thp_enabled(stru
 	       !inode_is_open_for_write(inode) && S_ISREG(inode->i_mode);
 }
 
-bool transparent_hugepage_active(struct vm_area_struct *vma);
+bool hugepage_vma_check(struct vm_area_struct *vma,
+			unsigned long vm_flags,
+			bool smaps);
 
 #define transparent_hugepage_use_zero_page()				\
 	(transparent_hugepage_flags &					\
@@ -351,11 +353,6 @@ static inline bool __transparent_hugepag
 	return false;
 }
 
-static inline bool transparent_hugepage_active(struct vm_area_struct *vma)
-{
-	return false;
-}
-
 static inline bool transhuge_vma_suitable(struct vm_area_struct *vma,
 		unsigned long addr)
 {
@@ -367,6 +364,13 @@ static inline bool transhuge_vma_enabled
 {
 	return false;
 }
+
+static inline bool hugepage_vma_check(struct vm_area_struct *vma,
+				       unsigned long vm_flags,
+				       bool smaps)
+{
+	return false;
+}
 
 static inline void prep_transhuge_page(struct page *page) {}
 
include/linux/khugepaged.h renamed from include/linux/khugepaged.h~mm-thp-kill-transparent_hugepage_active +0 -2
@@ -10,8 +10,6 @@ extern struct attribute_group khugepaged
 extern int khugepaged_init(void);
 extern void khugepaged_destroy(void);
 extern int start_stop_khugepaged(void);
-extern bool hugepage_vma_check(struct vm_area_struct *vma,
-			       unsigned long vm_flags);
 extern void __khugepaged_enter(struct mm_struct *mm);
 extern void __khugepaged_exit(struct mm_struct *mm);
 extern void khugepaged_enter_vma(struct vm_area_struct *vma,
mm/huge_memory.c renamed from mm/huge_memory.c~mm-thp-kill-transparent_hugepage_active +44 -9

65 lines not on this page · raw message

mm/khugepaged.c renamed from mm/khugepaged.c~mm-thp-kill-transparent_hugepage_active +4 -44

78 lines not on this page · raw message

_

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

mm-khugepaged-dont-carry-huge-page-to-the-next-loop-for-config_numa.patch