[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220520211605.51473-1-shy828301@gmail.com>
Date: Fri, 20 May 2022 14:15:58 -0700
From: Yang Shi <shy828301@...il.com>
To: vbabka@...e.cz, kirill.shutemov@...ux.intel.com,
akpm@...ux-foundation.org
Cc: shy828301@...il.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [mm-unstable PATCH 0/7] Cleanup transhuge_xxx helpers
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.
b/fs/proc/task_mmu.c | 4 +-
b/include/linux/huge_mm.h | 102 ++++++++++++++++++++++++++-----------------------------------------
b/include/linux/khugepaged.h | 21 +------------
b/mm/huge_memory.c | 74 ++++++++++++++++++++++++++++++++++++------------
b/mm/khugepaged.c | 92 ++++++++++++++++--------------------------------------------
b/mm/memory.c | 6 ++-
6 files changed, 129 insertions(+), 170 deletions(-)
Powered by blists - more mailing lists