Is Hugepage supported by freedom-u-sdk/linux now ?

(daiw) #1

Anyone can get RISC-V hugepage memory supported ? Thanks a lot.

I want to use hugepage memory to improve performance of application.
Firstly, I run make with freedom-u-sdk/Makefile.
Then, I run these commands to enable hugetlbfs:
cp freedom-u-sdk/work/linux/.config freedom-u-sdk/linux/
cd freedom-u-sdk/linux/
make menuconfig
cp freedom-u-sdk/linux/.config freedom-u-sdk/conf/linux_defconfig

root@UBT-16045:freedom-u-sdk# grep -i huge conf/linux_defconfig



Next, I run “make" with freedom-u-sdk/Makefile again to update linux kernel.
And run “make DISK=/dev/sdb format-boot-loader” to update the TF card.

With this new TF card, linux starts. But I can’t confirm hugepage memory is working
because I can’t find any hugepage setting in /proc/meminfo on my HiFive Unleashed board:

grep -i huge /proc/meminfo

ls -la /sys/kernel/mm/

total 0
drwxr-xr-x 3 root root 0 Jan 1 00:00 .
drwxr-xr-x 6 root root 0 Jan 1 00:00 …
drwxr-xr-x 2 root root 0 Jan 1 00:00 swap

(Jim Wilson) #2

You might have better luck getting an answer if you ask where RISC-V linux kernel experts hang out, like the linux-riscv mailing list.

Also, keep in mind that freedom-u-sdk contains an old and out-of-date copy of the linux kernel, probably before it was upstreamed. New kernel features are more likely to work in a more recent copy of the linux kernel sources.

(Paul Walmsley) #3

Hugepages aren’t supported by RISC-V Linux yet. Soon!

(daiw) #4

Thank you, jimw and paulw.

(Paul Walmsley) #5

Alexandre Ghiti has posted a patchset to add hugetlbfs support. While I haven’t tried it yet myself, it should apply against v4.20:

(daiw) #6

Next, if vfio-pci, uio and uio_pci_generic are supported, DPDK can be supported on RISC-V.
X64, ARM and Power have already enabled DPDK long before.
I hope DPDK can be used on RISC-V to get better performance of netweork I/O and memory use.