[PATCH v2 0/2] riscv: Support HAVE_ARCH_HUGE_VMAP and HAVE_ARCH_HUGE_VMALLOC

Liu Shixin posted 2 patches 3 years, 6 months ago
There is a newer version of this series
.../features/vm/huge-vmap/arch-support.txt    |  2 +-
arch/riscv/Kconfig                            |  2 +
arch/riscv/include/asm/vmalloc.h              | 18 ++++
arch/riscv/mm/Makefile                        |  1 +
arch/riscv/mm/pgtable.c                       | 83 +++++++++++++++++++
5 files changed, 105 insertions(+), 1 deletion(-)
create mode 100644 arch/riscv/mm/pgtable.c
[PATCH v2 0/2] riscv: Support HAVE_ARCH_HUGE_VMAP and HAVE_ARCH_HUGE_VMALLOC
Posted by Liu Shixin 3 years, 6 months ago
Since riscv64 has already support SATP_MODE_57 by default, it is time to
support more hugepage-related features. These two patches will enable
HAVE_ARCH_HUGE_VMAP and HAVE_ARCH_HUGE_VMALLOC.

v1->v2: Fix the build error reported by kernel-test.

Liu Shixin (2):
  riscv: Enable HAVE_ARCH_HUGE_VMAP for 64BIT
  riscv: Enable HAVE_ARCH_HUGE_VMALLOC for 64BIT

 .../features/vm/huge-vmap/arch-support.txt    |  2 +-
 arch/riscv/Kconfig                            |  2 +
 arch/riscv/include/asm/vmalloc.h              | 18 ++++
 arch/riscv/mm/Makefile                        |  1 +
 arch/riscv/mm/pgtable.c                       | 83 +++++++++++++++++++
 5 files changed, 105 insertions(+), 1 deletion(-)
 create mode 100644 arch/riscv/mm/pgtable.c

-- 
2.25.1
Re: [PATCH v2 0/2] riscv: Support HAVE_ARCH_HUGE_VMAP and HAVE_ARCH_HUGE_VMALLOC
Posted by Björn Töpel 3 years, 5 months ago
Liu Shixin <liushixin2@huawei.com> writes:

> Since riscv64 has already support SATP_MODE_57 by default, it is time to
> support more hugepage-related features. These two patches will enable
> HAVE_ARCH_HUGE_VMAP and HAVE_ARCH_HUGE_VMALLOC.
>

Just a note; The HP support does not require sv57. Pmd/Mega- and
pud/gigapages work for sv39 and sv48 as well.

> v1->v2: Fix the build error reported by kernel-test.
>
> Liu Shixin (2):
>   riscv: Enable HAVE_ARCH_HUGE_VMAP for 64BIT
>   riscv: Enable HAVE_ARCH_HUGE_VMALLOC for 64BIT
>
>  .../features/vm/huge-vmap/arch-support.txt    |  2 +-
>  arch/riscv/Kconfig                            |  2 +
>  arch/riscv/include/asm/vmalloc.h              | 18 ++++
>  arch/riscv/mm/Makefile                        |  1 +
>  arch/riscv/mm/pgtable.c                       | 83 +++++++++++++++++++
>  5 files changed, 105 insertions(+), 1 deletion(-)
>  create mode 100644 arch/riscv/mm/pgtable.c
>

I've taken this series for a spin, and tested huge pud pages via
ioremap(), and huge pmd pages via vmalloc_huge() on qemu for sv39, sv48,
and sv57.

Patch 2 have a spelling error in the commit message: "enbale" vs
"enable".

Fix up the spelling error in patch 2, and after that feel free to add
for the whole series:

Reviewed-by: Björn Töpel <bjorn@kernel.org>
Tested-by: Björn Töpel <bjorn@kernel.org>


Nice work!
Björn
Re: [PATCH v2 0/2] riscv: Support HAVE_ARCH_HUGE_VMAP and HAVE_ARCH_HUGE_VMALLOC
Posted by Liu Shixin 3 years, 5 months ago
On 2022/10/11 20:39, Björn Töpel wrote:
> Liu Shixin <liushixin2@huawei.com> writes:
>
>> Since riscv64 has already support SATP_MODE_57 by default, it is time to
>> support more hugepage-related features. These two patches will enable
>> HAVE_ARCH_HUGE_VMAP and HAVE_ARCH_HUGE_VMALLOC.
>>
> Just a note; The HP support does not require sv57. Pmd/Mega- and
> pud/gigapages work for sv39 and sv48 as well.
Yes, I didn't explain it clearly. I will rewrite it.
>> v1->v2: Fix the build error reported by kernel-test.
>>
>> Liu Shixin (2):
>>   riscv: Enable HAVE_ARCH_HUGE_VMAP for 64BIT
>>   riscv: Enable HAVE_ARCH_HUGE_VMALLOC for 64BIT
>>
>>  .../features/vm/huge-vmap/arch-support.txt    |  2 +-
>>  arch/riscv/Kconfig                            |  2 +
>>  arch/riscv/include/asm/vmalloc.h              | 18 ++++
>>  arch/riscv/mm/Makefile                        |  1 +
>>  arch/riscv/mm/pgtable.c                       | 83 +++++++++++++++++++
>>  5 files changed, 105 insertions(+), 1 deletion(-)
>>  create mode 100644 arch/riscv/mm/pgtable.c
>>
> I've taken this series for a spin, and tested huge pud pages via
> ioremap(), and huge pmd pages via vmalloc_huge() on qemu for sv39, sv48,
> and sv57.
>
> Patch 2 have a spelling error in the commit message: "enbale" vs
> "enable".
>
> Fix up the spelling error in patch 2, and after that feel free to add
> for the whole series:
>
> Reviewed-by: Björn Töpel <bjorn@kernel.org>
> Tested-by: Björn Töpel <bjorn@kernel.org>
>
Thanks for your review and test. I will fix the above errors immediately.
> Nice work!
> Björn
>
> .
>