Disable CPU cores on Yocto

Why in my Yocto rpi-basic-image, the online files in each CPU folder doesnt exist?, I cant disable the CPU cores with "echo 0 > /sys/devices/system/cpu/cpu1/online", because de online file doesnt exist. You know why? And also i installed ubuntu server 19 on my raspberry pi 2 and neither the online files for each CPU core exist.

1 answer

  • answered 2019-11-14 21:38 Mostafa

    To be able to disable/enable cores at run time you need to configure your kernel to hotplug CPUs


    You can check if this configuration is enabled by extracting the kernel configuration under /proc/config.gz (If it is enabled).

    To limit the number of CPUs, you can achive this from kernel command line nr_cpus

    you can read more about CPU hotplug in Linux kernel for more info.