All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: vbabka@suse.cz, kirill.shutemov@linux.intel.com,
	akpm@linux-foundation.org
Cc: shy828301@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [mm-unstable PATCH 0/7] Cleanup transhuge_xxx helpers
Date: Fri, 20 May 2022 14:15:58 -0700	[thread overview]
Message-ID: <20220520211605.51473-1-shy828301@gmail.com> (raw)


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(-)


             reply	other threads:[~2022-05-20 21:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 21:15 Yang Shi [this message]
2022-05-20 21:15 ` [PATCH 1/7] mm: khugepaged: check THP flag in hugepage_vma_check() Yang Shi
2022-05-20 21:16 ` [PATCH 2/7] mm: thp: introduce transhuge_vma_size_ok() helper Yang Shi
2022-05-21  1:39   ` Hillf Danton
2022-05-23 18:12     ` Yang Shi
2022-05-20 21:16 ` [PATCH 3/7] mm: khugepaged: remove the redundant anon vma check Yang Shi
2022-05-20 21:16 ` [PATCH 4/7] mm: khugepaged: use transhuge_vma_suitable replace open-code Yang Shi
2022-05-20 21:16 ` [PATCH 5/7] mm: thp: kill transparent_hugepage_active() Yang Shi
2022-05-20 21:16 ` [PATCH 6/7] mm: thp: kill __transhuge_page_enabled() Yang Shi
2022-05-20 21:16 ` [PATCH 7/7] mm: khugepaged: reorg some khugepaged helpers Yang Shi

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=20220520211605.51473-1-shy828301@gmail.com \
    --to=shy828301@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vbabka@suse.cz \
    /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.