From: Muchun Song <songmuchun@bytedance.com>
To: will@kernel.org, akpm@linux-foundation.org, david@redhat.com,
bodeddub@amazon.com, osalvador@suse.de, mike.kravetz@oracle.com,
rientjes@google.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
duanxiongchun@bytedance.com,
Muchun Song <songmuchun@bytedance.com>
Subject: [PATCH 3/3] arm64: mm: hugetlb: add support for free vmemmap pages of HugeTLB
Date: Wed, 10 Mar 2021 15:15:35 +0800 [thread overview]
Message-ID: <20210310071535.35245-4-songmuchun@bytedance.com> (raw)
In-Reply-To: <20210310071535.35245-1-songmuchun@bytedance.com>
The preparation of supporting freeing vmemmap associated with each
infrastructure is ready, so now we can support it for arm64.
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
---
arch/arm64/mm/mmu.c | 5 +++++
fs/Kconfig | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 3802cfbdd20d..6051a120c906 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -22,6 +22,7 @@
#include <linux/io.h>
#include <linux/mm.h>
#include <linux/vmalloc.h>
+#include <linux/hugetlb.h>
#include <asm/barrier.h>
#include <asm/cputype.h>
@@ -1109,6 +1110,10 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
pmd_t *pmdp;
WARN_ON((start < VMEMMAP_START) || (end > VMEMMAP_END));
+
+ if (is_hugetlb_free_vmemmap_enabled() && !altmap)
+ return vmemmap_populate_basepages(start, end, node, altmap);
+
do {
next = pmd_addr_end(addr, end);
diff --git a/fs/Kconfig b/fs/Kconfig
index b5dcc68aab25..d90860135844 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -239,9 +239,9 @@ config HUGETLB_PAGE
config HUGETLB_PAGE_FREE_VMEMMAP
def_bool HUGETLB_PAGE
- depends on X86_64
+ select HAVE_BOOTMEM_INFO_NODE if X86_64
depends on SPARSEMEM_VMEMMAP
- depends on HAVE_BOOTMEM_INFO_NODE
+ depends on X86_64 || ARM64
config MEMFD_CREATE
def_bool TMPFS || HUGETLBFS
--
2.11.0
next prev parent reply other threads:[~2021-03-10 7:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 7:15 [PATCH 0/3] Add support for free vmemmap pages of HugeTLB for arm64 Muchun Song
2021-03-10 7:15 ` [PATCH 1/3] mm: bootmem_info: mark register_page_bootmem_info_section __init Muchun Song
2021-03-10 7:15 ` [PATCH 2/3] mm: hugetlb: introduce arch_free_vmemmap_page Muchun Song
2021-03-10 12:16 ` kernel test robot
2021-03-11 0:15 ` kernel test robot
2021-03-10 7:15 ` Muchun Song [this message]
2021-03-11 0:47 ` [PATCH 3/3] arm64: mm: hugetlb: add support for free vmemmap pages of HugeTLB kernel test robot
2021-03-11 4:12 ` [PATCH 0/3] Add support for free vmemmap pages of HugeTLB for arm64 Chen Huang
2021-03-11 5:00 ` Bodeddula, Balasubramaniam
2021-03-11 6:01 ` Chen Huang
2021-03-11 18:00 ` Bodeddula, Balasubramaniam
2021-03-12 2:52 ` Chen Huang
2021-03-12 17:38 ` Mike Kravetz
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=20210310071535.35245-4-songmuchun@bytedance.com \
--to=songmuchun@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=bodeddub@amazon.com \
--cc=david@redhat.com \
--cc=duanxiongchun@bytedance.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=osalvador@suse.de \
--cc=rientjes@google.com \
--cc=will@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox