From: Andrew Jones <ajones@ventanamicro.com>
To: guoren@kernel.org
Cc: tongtiangen@huawei.com, alexandre.ghiti@canonical.com,
muchun.song@linux.dev, palmer@rivosinc.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Guo Ren <guoren@linux.alibaba.com>,
Muchun Song <songmuchun@bytedance.com>
Subject: Re: [PATCH -next V2] riscv: mm: hugetlb: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
Date: Fri, 27 Jan 2023 12:57:14 +0100 [thread overview]
Message-ID: <20230127115714.467ymd5cpvi5h2ey@orel> (raw)
In-Reply-To: <20230127050421.1920048-1-guoren@kernel.org>
On Fri, Jan 27, 2023 at 12:04:21AM -0500, guoren@kernel.org wrote:
> From: Guo Ren <guoren@linux.alibaba.com>
>
> Add HVO support for RISC-V; see commit 6be24bed9da3 ("mm: hugetlb:
> introduce a new config HUGETLB_PAGE_FREE_VMEMMAP").
I found Documentation/mm/vmemmap_dedup.rst even more enlightening
about HVO than the commit message of 6be24bed9da3.
> This patch is
> similar to commit 1e63ac088f20 ("arm64: mm: hugetlb: enable
> HUGETLB_PAGE_FREE_VMEMMAP for arm64"), and riscv's motivation is the
> same as arm64. The current riscv was ready to enable HVO after fixup,
> ref commit d33deda095d3 ("riscv/mm: hugepage's PG_dcache_clean flag
> is only set in head page").
>
> The HugeTLB VmemmapvOptimization (HVO) defaults to off in Kconfig.
>
> Here is the riscv test log:
> cat /proc/sys/vm/hugetlb_optimize_vmemmap
> echo 8 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
> mount -t hugetlbfs none test/ -o pagesize=2048k
> <Try some simple hugetlb test in test dir, no problem found.>
>
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@kernel.org>
> Link: https://lore.kernel.org/linux-riscv/1F5AF29D-708A-483B-A29F-CAEE6F554866@linux.dev/
> Acked-by: Muchun Song <songmuchun@bytedance.com>
> ---
> Changelog:
> V2:
> - Optimize the commit log
> - Remove riscv page compound_head fixup which has been merged.
> - Rebase on riscv for-next (20230127)
> - Add HVO author's acked-by
>
> V1:
> https://lore.kernel.org/linux-riscv/20221023133205.3493564-1-guoren@kernel.org/
> ---
> arch/riscv/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index e2b656043abf..949974a38a41 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -46,6 +46,7 @@ config RISCV
> select ARCH_WANT_FRAME_POINTERS
> select ARCH_WANT_GENERAL_HUGETLB
> select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
> + select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
> select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
> select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
> select BUILDTIME_TABLE_SORT if MMU
> --
> 2.36.1
>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Thanks,
drew
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jones <ajones@ventanamicro.com>
To: guoren@kernel.org
Cc: tongtiangen@huawei.com, alexandre.ghiti@canonical.com,
muchun.song@linux.dev, palmer@rivosinc.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Guo Ren <guoren@linux.alibaba.com>,
Muchun Song <songmuchun@bytedance.com>
Subject: Re: [PATCH -next V2] riscv: mm: hugetlb: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
Date: Fri, 27 Jan 2023 12:57:14 +0100 [thread overview]
Message-ID: <20230127115714.467ymd5cpvi5h2ey@orel> (raw)
In-Reply-To: <20230127050421.1920048-1-guoren@kernel.org>
On Fri, Jan 27, 2023 at 12:04:21AM -0500, guoren@kernel.org wrote:
> From: Guo Ren <guoren@linux.alibaba.com>
>
> Add HVO support for RISC-V; see commit 6be24bed9da3 ("mm: hugetlb:
> introduce a new config HUGETLB_PAGE_FREE_VMEMMAP").
I found Documentation/mm/vmemmap_dedup.rst even more enlightening
about HVO than the commit message of 6be24bed9da3.
> This patch is
> similar to commit 1e63ac088f20 ("arm64: mm: hugetlb: enable
> HUGETLB_PAGE_FREE_VMEMMAP for arm64"), and riscv's motivation is the
> same as arm64. The current riscv was ready to enable HVO after fixup,
> ref commit d33deda095d3 ("riscv/mm: hugepage's PG_dcache_clean flag
> is only set in head page").
>
> The HugeTLB VmemmapvOptimization (HVO) defaults to off in Kconfig.
>
> Here is the riscv test log:
> cat /proc/sys/vm/hugetlb_optimize_vmemmap
> echo 8 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
> mount -t hugetlbfs none test/ -o pagesize=2048k
> <Try some simple hugetlb test in test dir, no problem found.>
>
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@kernel.org>
> Link: https://lore.kernel.org/linux-riscv/1F5AF29D-708A-483B-A29F-CAEE6F554866@linux.dev/
> Acked-by: Muchun Song <songmuchun@bytedance.com>
> ---
> Changelog:
> V2:
> - Optimize the commit log
> - Remove riscv page compound_head fixup which has been merged.
> - Rebase on riscv for-next (20230127)
> - Add HVO author's acked-by
>
> V1:
> https://lore.kernel.org/linux-riscv/20221023133205.3493564-1-guoren@kernel.org/
> ---
> arch/riscv/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index e2b656043abf..949974a38a41 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -46,6 +46,7 @@ config RISCV
> select ARCH_WANT_FRAME_POINTERS
> select ARCH_WANT_GENERAL_HUGETLB
> select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
> + select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
> select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
> select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
> select BUILDTIME_TABLE_SORT if MMU
> --
> 2.36.1
>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Thanks,
drew
next prev parent reply other threads:[~2023-01-27 12:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 5:04 [PATCH -next V2] riscv: mm: hugetlb: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP guoren
2023-01-27 5:04 ` guoren
2023-01-27 11:57 ` Andrew Jones [this message]
2023-01-27 11:57 ` Andrew Jones
2023-02-01 1:53 ` Guo Ren
2023-02-01 1:53 ` Guo Ren
2023-01-31 18:23 ` Conor Dooley
2023-01-31 18:23 ` Conor Dooley
2023-02-01 1:54 ` Guo Ren
2023-02-01 1:54 ` Guo Ren
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=20230127115714.467ymd5cpvi5h2ey@orel \
--to=ajones@ventanamicro.com \
--cc=alexandre.ghiti@canonical.com \
--cc=guoren@kernel.org \
--cc=guoren@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=muchun.song@linux.dev \
--cc=palmer@rivosinc.com \
--cc=songmuchun@bytedance.com \
--cc=tongtiangen@huawei.com \
/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.