Rate This Document
Findability
Accuracy
Completeness
Readability

Dual-Layer Scheduling

You can modify the CentOS 7.6 kernel and install it on the host machine and VM to support some features and improve the overall system performance.

Kernel Description

When the compiled CentOS 7.6 kernel is installed on the host machine and VM, the following features are supported to improve the overall system performance:

  • vcpu preempt: optimizes vCPU scheduling to prevent vCPUs from failing to be scheduled in the case of CPU overcommitment.
  • pvspinlock optimization: fixes the performance deterioration problem caused by long lock time of the vCPUs.
  • guest vcpu topology: fixes the problem of incorrectly displaying the CPU topology on a VM with the native CentOS 7.6 kernel.

The pvspinlock optimization feature is disabled by default. You need to add the arm_pvspin option to the cmdline of the VM. After the feature is enabled, the following information will be displayed in the message log of the VM:

Kernel Installation

The kernel must be installed on both the host and VM.

  1. Install the compilation dependencies.
    yum -y install yum-utils rpm-build
  2. Download the kernel library from the Kunpeng community.
    1
    git clone https://github.com/kunpengcompute/kernel-alt.git
    
  3. Download the kernel source code package and install it.
    1
    2
    wget https://archive.kernel.org/centos-vault/altarch/7.6.1810/os/Source/SPackages/kernel-alt-4.14.0-115.el7a.0.1.src.rpm
    rpm -ivh kernel-alt-4.14.0-115.el7a.0.1.src.rpm
    
  4. Copy the files to the specified directories.
    1
    2
    3
    4
    5
    cd kernel-alt
    cp -f *patch ~/rpmbuild/SOURCES/
    cp -f kernel-alt-4.14.0-aarch64.config ~/rpmbuild/SOURCES/
    cp -f kernel-alt-4.14.0-aarch64-debug.config ~/rpmbuild/SOURCES/
    cp -f kernel-alt.spec ~/rpmbuild/SPECS/
    
  5. Start the compilation.
    1
    2
    3
    cd ~/rpmbuild/SPECS/
    yum-builddep -y kernel-alt.spec
    rpmbuild -bb kernel-alt.spec
    
  6. Install and compile the kernel.
    1
    2
    cd ~/rpmbuild/RPMS/aarch64
    rpm -ivh kernel-4.14.0-115.el7.0.2.aarch64.rpm
    
  7. Set the GRUB boot option to the newly installed kernel and restart the system.
  8. After the kernel is successfully installed, check the OS kernel version.
    1
    uname -r
    

    The following version information is displayed: