linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mm-unstable v3 PATCH 0/7] Cleanup transhuge_xxx helpers
@ 2022-06-06 21:44 Yang Shi
  2022-06-06 21:44 ` [v3 PATCH 1/7] mm: khugepaged: check THP flag in hugepage_vma_check() Yang Shi
                   ` (8 more replies)
  0 siblings, 9 replies; 40+ messages in thread
From: Yang Shi @ 2022-06-06 21:44 UTC (permalink / raw)
  To: vbabka, kirill.shutemov, willy, akpm; +Cc: shy828301, linux-mm, linux-kernel


v3: * Fixed the comment from Willy
v2: * Rebased to the latest mm-unstable
    * Fixed potential regression for smaps's THPeligible

This series is the follow-up of the discussion about cleaning up transhuge_xxx
helpers at https://lore.kernel.org/linux-mm/627a71f8-e879-69a5-ceb3-fc8d29d2f7f1@suse.cz/.

THP has a bunch of helpers that do VMA sanity check for different paths, they
do the similar checks for the most callsites and have a lot duplicate codes.
And it is confusing what helpers should be used at what conditions.

This series reorganized and cleaned up the code so that we could consolidate
all the checks into hugepage_vma_check().

The transhuge_vma_enabled(), transparent_hugepage_active() and
__transparent_hugepage_enabled() are killed by this series.

Added transhuge_vma_size_ok() helper to remove some duplicate code.


Yang Shi (7):
      mm: khugepaged: check THP flag in hugepage_vma_check()
      mm: thp: introduce transhuge_vma_size_ok() helper
      mm: khugepaged: remove the redundant anon vma check
      mm: khugepaged: use transhuge_vma_suitable replace open-code
      mm: thp: kill transparent_hugepage_active()
      mm: thp: kill __transhuge_page_enabled()
      mm: khugepaged: reorg some khugepaged helpers

 fs/proc/task_mmu.c         |  2 +-
 include/linux/huge_mm.h    | 84 ++++++++++++++++++++++++++++------------------------------------------
 include/linux/khugepaged.h | 21 ++----------------
 mm/huge_memory.c           | 64 +++++++++++++++++++++++++++++++++++++++++++++--------
 mm/khugepaged.c            | 78 +++++++++++++++--------------------------------------------------
 mm/memory.c                |  7 ++++--
 6 files changed, 114 insertions(+), 142 deletions(-)



^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2022-06-14 23:55 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-06 21:44 [mm-unstable v3 PATCH 0/7] Cleanup transhuge_xxx helpers Yang Shi
2022-06-06 21:44 ` [v3 PATCH 1/7] mm: khugepaged: check THP flag in hugepage_vma_check() Yang Shi
2022-06-09 17:49   ` Zach O'Keefe
2022-06-10  7:09   ` Miaohe Lin
2022-06-06 21:44 ` [v3 PATCH 2/7] mm: thp: introduce transhuge_vma_size_ok() helper Yang Shi
2022-06-09 22:21   ` Zach O'Keefe
2022-06-10  0:08     ` Yang Shi
2022-06-10  0:51       ` Zach O'Keefe
2022-06-10 16:38         ` Yang Shi
2022-06-10 21:24           ` Yang Shi
2022-06-10  7:20   ` Miaohe Lin
2022-06-10 16:47     ` Yang Shi
2022-06-06 21:44 ` [v3 PATCH 3/7] mm: khugepaged: remove the redundant anon vma check Yang Shi
2022-06-09 23:23   ` Zach O'Keefe
2022-06-10  0:01     ` Yang Shi
2022-06-10  7:23   ` Miaohe Lin
2022-06-10  7:28     ` Miaohe Lin
2022-06-06 21:44 ` [v3 PATCH 4/7] mm: khugepaged: use transhuge_vma_suitable replace open-code Yang Shi
2022-06-10  1:51   ` Zach O'Keefe
2022-06-10 16:59     ` Yang Shi
2022-06-10 22:03       ` Yang Shi
2022-06-11  0:27         ` Zach O'Keefe
2022-06-11  3:25           ` Yang Shi
2022-06-11 21:43             ` Zach O'Keefe
2022-06-14 17:40               ` Yang Shi
2022-06-06 21:44 ` [v3 PATCH 5/7] mm: thp: kill transparent_hugepage_active() Yang Shi
2022-06-10  1:02   ` Zach O'Keefe
2022-06-10 17:02     ` Yang Shi
2022-06-13 15:06       ` Zach O'Keefe
2022-06-14 19:16         ` Yang Shi
2022-06-06 21:44 ` [v3 PATCH 6/7] mm: thp: kill __transhuge_page_enabled() Yang Shi
2022-06-10  2:22   ` Zach O'Keefe
2022-06-10 17:24     ` Yang Shi
2022-06-10 21:07       ` Yang Shi
2022-06-13 14:54         ` Zach O'Keefe
2022-06-14 18:51           ` Yang Shi
2022-06-14 23:55             ` Zach O'Keefe
2022-06-06 21:44 ` [v3 PATCH 7/7] mm: khugepaged: reorg some khugepaged helpers Yang Shi
2022-06-09 23:32 ` [mm-unstable v3 PATCH 0/7] Cleanup transhuge_xxx helpers Zach O'Keefe
2022-06-10  7:08 ` Miaohe Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).