03-23-2018 08:10 AM
We have a XC7Z100 device running the Xilinx Linux kernel (4.6.0-xilinx-22243-g8f0c7fe-dirty) from GitHub. We are not currently using the Petalinux tools to generate the Linux build. I am trying to enable huge pages support for the TLB to address a performance issue we have once we add "too much" data into some arrays; that are continually streamed; in our application. These arrays are processed by a few C++ modules so it appears we are seeing TLB misses which are the cause of the performance issue.
The ARM A9 technical reference manual shows there is L2 TLB huge page support. I have enabled the following in the kernel build.
Hugepagesize: 2048 kB
Under /sys/kernel/mm I don't see any entries for hugepages/ transparent_hugepage/
I have seen a reference (Google search) from 3 years ago that someone did a test of huge pages being enabled on a Z-7045 device that showed it supports an L2 TLB size of 128k, but it did not go into how the kernel was configured.
Am I missing something from the kernel configuration to get this enabled/working?
03-26-2018 03:59 PM
Your kernel config looks good. I'm not sure we tested with TLB and huge tables. I can check on this.
03-27-2018 02:01 PM
I check with our kernel maintainer and Since ARM supports TLB it should work out.
Refer some pages.
03-30-2018 12:12 PM
Thank you for the information. I started to look further into what the issue might be and did discover something. The way the kernel Kconfig files are now, you can only get the TLB huge page support in the kernel if your ARM processor supports Large Page Address Extensions (LPAE). The ARM Cortex-A9 in the Zynq-7000 does not support LPAE. Here is a snippet from the Linux arch/arm/Kconfig file.
depends on ARM_LPAE
depends on ARM_LPAE
I confirmed not being able to select the huge page support by downloading the Petalinux tools and the BSP's for the ZC706 and the ZCU102 FPGA's and ran the Petalinux menuconfig option for Linux. The screenshots for each are attached, showing the ZC706 does not have the option available based on not having ARM_LPAE be true as there is no LPAE support in the A9.
One can not simply remove the depends on ARM_LPAE in the Kconfig file as this causes kernel build errors. I don't know if you could run an ARM_LPAE enabled kernel on a processor that does not support it even if you would be accessing 1GB or less of memory for the processor.
This might not have a happy ending.
04-02-2018 07:29 AM
Unless there is something I am missing, with the way the current kernel configuration files are, you cannot enable TLB huge page support in the kernel build unless your ARM device supports LPAE which the Cortex A9 in the Zynq-7000 does not support.
Did Xilinx ever test a kernel with TLB huge page support on the Zynq-7000? If so, how did the kernel build get configured?