Configuring the OS
This section describes how to set the SME bit width and enable SDMA for huge pages to improve performance for the Kunpeng 920 72F8C processor.
- Set the SME bit width. (Perform this step only if the processor does not have HBM.)
1echo 64 > /proc/sys/abi/sme_default_vector_length
After the modification, you can run the cat /proc/sys/abi/sme_default_vector_length command to check whether the modification is successful.
- Enable the SMMU mode in the BIOS and reset SDMA.
- Enable SMMU.
Restart the system, enter the BIOS, choose Advanced, go to MISC Configuration, and set Support Smmu to Enabled.


This option enables SDMA devices. Otherwise, BLAS of the SME version cannot run because it cannot find an SDMA device. You can verify if SMMU is enabled by checking whether sdma0, sdma1, sdma2, and sdma3 exist in the /dev directory.
- Reset the number of SDMA shared channels and enable the performance mode.
rmmod sdma_dae modprobe sdma_dae share_chns=160 safe_mode=0
An SDMA device can provide 160 channels, among which 16 are shared channels by default (you can view SDMA information by running modinfo sdma_dae). Adding shared channels improves the efficiency of transferring matrix data from DDR to HBM, thereby improving the performance. Disabling the SDMA secure mode also improves SDMA data transfer efficiency.
- Enable SMMU.
- Run the following script to set huge pages. In the script, ddr_size and hbm_size indicate the number of 2 MB huge pages to be set on the DDR and HBM NUMA nodes, respectively. The recommended values are 2044.
ddr_size=${1} hbm_size=${2} for i in $(seq 0 15); do echo ${ddr_size} > /sys/devices/system/node/node${i}/hugepages/hugepages-2048kB/nr_hugepages done echo "reserve ${ddr_size} x 2M huge page for DDR done" for i in $(seq 16 31); do echo ${hbm_size} > /sys/devices/system/node/node${i}/hugepages/hugepages-2048kB/nr_hugepages done echo "reserve ${hbm_size} x 2M huge page for HBM done"