我要评分
获取效率
正确性
完整性
易理解

Failed to Execute a Resource Scheduling Task on UOS

Symptom

A resource scheduling task fails on UOS. An error is reported indicating that the task collection fails because the system kernel version is earlier than 4.19. You are advised to use 4.19 or later.

Possible Cause

The BPF parameter is not configured. The kernel needs to be recompiled.

Checking the Tracers Configuration

  1. Check the current kernel version.
    1
    uname -r
    
    Figure 1 Kernel version
  2. Download the source code of the target version at kernel.org.
    Figure 2 Downloading the source code
  3. Decompress the source package and go to the source code directory.
    1
    2
    tar -xvf linux-4.19.274.tar.xz
    cd linux-4.19.274
    
  4. Copy the current kernel configuration file to the extracted source code directory.

    Rename the copied configuration file as .config.

    1
    cp /boot/config-4.19-90-2201.4.0.0135.up1.uel20.aarch64 ./.config
    
    Figure 3 Copying the configuration file
  5. Configure the kernel.

    Run the make menuconfig command to open the kernel configuration menu and adjust the compilation options of the modules loaded by the kernel as required, such as changing the kernel name and adding the modules that are missing in the system.

  6. View the Tracers option.

    Go to the kernel configuration page and select Kernel hacking.

    Figure 4 Compilation option menu

    Tracers is not enabled in the configuration. Therefore, perf does not support collection of schedule events.

    Figure 5 Configuration of Tracers

Configuring Tracers and Compiling the Kernel

  1. Configure the built-in options of Tracers.

    Select Tracers, press Enter, and select Scheduling Latency Tracer. Save the settings and exit.

    Figure 6 Selecting Scheduling Latency Tracer

    A dialog box is displayed asking you to enter the name of the file to be saved. Retain the default value and click OK.

    Figure 7 Entering a file name
  2. Check Tracers and save the settings.
    Figure 8 Checking the Tracers option

    Press Esc twice.

  3. Compile the kernel.

    Switch to the source code directory. In the command, 128 indicates the number of CPU cores. Change it as required.

    1
    make -j 128
    
    Figure 9 Compilation
  4. Install the modules.

    Compile and install the modules after the compilation is complete.

    1
    make modules_install
    
    Figure 10 Compiling and installing the modules
  5. Install the kernel core file.
    1
    make install
    
    Figure 11 Installing the kernel core file
  6. Reboot the system.
    1
    reboot
    
  7. Check the kernel version.
    1
    uname -r
    

    Check the kernel version. It is found that the kernel version is updated.

    Figure 12 Confirmation