diff mbox series

[meta-oe] libhugetlbfs: add RISC-V to COMPATIBLE_HOSTS

Message ID 20260415090507.819848-1-joaomarcos.costa@bootlin.com
State Accepted
Headers show
Series [meta-oe] libhugetlbfs: add RISC-V to COMPATIBLE_HOSTS | expand

Commit Message

Joao Marcos Costa April 15, 2026, 9:05 a.m. UTC
A preliminar effort to support RISC-V was added in v2.23:

a529598 Introduce basic riscv64 support [1]

Following the guidelines in libhugetlbfs's HOWTO, here are the outputs
of some commands in qemuriscv64:

root@qemuriscv64:~# grep -i huge /proc/filesystems
nodev	hugetlbfs
root@qemuriscv64:~# hugeadm --pool-list
      Size  Minimum  Current  Maximum  Default
     65536        0        0        0
   2097152        0        0        0        *
root@qemuriscv64:~# hugeadm --pool-pages-min 2MB:10 --add-temp-swap
root@qemuriscv64:~# hugeadm --pool-list
      Size  Minimum  Current  Maximum  Default
     65536        0        0        0
   2097152       10       10       10        *
root@qemuriscv64:~# hugeadm --pool-pages-min 2MB:-5
root@qemuriscv64:~# hugeadm --pool-list
      Size  Minimum  Current  Maximum  Default
     65536        0        0        0
   2097152        5        5       10        *

Regarding toolchains, libhugetlbfs for RISC-V builds fine with both
clang and gcc.

[1]: https://github.com/libhugetlbfs/libhugetlbfs/commit/a529598dd256c79799d5e43e6d79146ca15f1c16

Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
---
 meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Khem Raj April 15, 2026, 3:01 p.m. UTC | #1
On Wed, Apr 15, 2026 at 2:05 AM João Marcos Costa <
joaomarcos.costa@bootlin.com> wrote:

> A preliminar effort to support RISC-V was added in v2.23:
>
> a529598 Introduce basic riscv64 support [1]
>
> Following the guidelines in libhugetlbfs's HOWTO, here are the outputs
> of some commands in qemuriscv64:
>
> root@qemuriscv64:~# grep -i huge /proc/filesystems
> nodev   hugetlbfs
> root@qemuriscv64:~# hugeadm --pool-list
>       Size  Minimum  Current  Maximum  Default
>      65536        0        0        0
>    2097152        0        0        0        *
> root@qemuriscv64:~# hugeadm --pool-pages-min 2MB:10 --add-temp-swap
> root@qemuriscv64:~# hugeadm --pool-list
>       Size  Minimum  Current  Maximum  Default
>      65536        0        0        0
>    2097152       10       10       10        *
> root@qemuriscv64:~# hugeadm --pool-pages-min 2MB:-5
> root@qemuriscv64:~# hugeadm --pool-list
>       Size  Minimum  Current  Maximum  Default
>      65536        0        0        0
>    2097152        5        5       10        *
>
> Regarding toolchains, libhugetlbfs for RISC-V builds fine with both
> clang and gcc.
>
> [1]:
> https://github.com/libhugetlbfs/libhugetlbfs/commit/a529598dd256c79799d5e43e6d79146ca15f1c16
>
>
Neat. now memcached and vm in kernel-selftest can be enabled for RV64, can
you check?


> Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
> ---
>  meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
> b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
> index 89ce11f6e4..dd2fbbc7cd 100644
> --- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
> +++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
> @@ -31,7 +31,7 @@ SRC_URI = " \
>  UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
>
>
> -COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
> +COMPATIBLE_HOST =
> "(i.86|x86_64|powerpc|powerpc64|riscv64|aarch64|arm).*-linux*"
>
>  LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
>  LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
> --
> 2.47.0
>
>
Joao Marcos Costa April 15, 2026, 3:25 p.m. UTC | #2
Hello, Khem

On 4/15/26 17:01, Khem Raj wrote:
> 
> 
> On Wed, Apr 15, 2026 at 2:05 AM João Marcos Costa 
> <joaomarcos.costa@bootlin.com <mailto:joaomarcos.costa@bootlin.com>> wrote:
> 
>     A preliminar effort to support RISC-V was added in v2.23:
> 
>     a529598 Introduce basic riscv64 support [1]
> 
>     Following the guidelines in libhugetlbfs's HOWTO, here are the outputs
>     of some commands in qemuriscv64:
> 
>     root@qemuriscv64:~# grep -i huge /proc/filesystems
>     nodev   hugetlbfs
>     root@qemuriscv64:~# hugeadm --pool-list
>            Size  Minimum  Current  Maximum  Default
>           65536        0        0        0
>         2097152        0        0        0        *
>     root@qemuriscv64:~# hugeadm --pool-pages-min 2MB:10 --add-temp-swap
>     root@qemuriscv64:~# hugeadm --pool-list
>            Size  Minimum  Current  Maximum  Default
>           65536        0        0        0
>         2097152       10       10       10        *
>     root@qemuriscv64:~# hugeadm --pool-pages-min 2MB:-5
>     root@qemuriscv64:~# hugeadm --pool-list
>            Size  Minimum  Current  Maximum  Default
>           65536        0        0        0
>         2097152        5        5       10        *
> 
>     Regarding toolchains, libhugetlbfs for RISC-V builds fine with both
>     clang and gcc.
> 
>     [1]:
>     https://github.com/libhugetlbfs/libhugetlbfs/commit/a529598dd256c79799d5e43e6d79146ca15f1c16 <https://github.com/libhugetlbfs/libhugetlbfs/commit/a529598dd256c79799d5e43e6d79146ca15f1c16>
> 
> 
> Neat. now memcached and vm in kernel-selftest can be enabled for RV64, 
> can you check?

Sure, I'm on it.
diff mbox series

Patch

diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
index 89ce11f6e4..dd2fbbc7cd 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
@@ -31,7 +31,7 @@  SRC_URI = " \
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
 
-COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
+COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|riscv64|aarch64|arm).*-linux*"
 
 LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
 LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"