Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Linux kernel supports the cpu-hotplug mechanism. You can enable or disable the CPU or CPU core without rebooting the system. Not only is CPU hotplug useful for replacing defective components, but it can also be used in other contexts to increase the productivity of a system.

The i.MX8QM/i.MX8QXP SoC can have multiple processor cores on the die. To see all available cores in the system, execute:

Code Block
languagebash
$ ls /sys/devices/system/cpu  -1

The output:

Code Block
languagebash
cpu0    cpu1   cpu2   cpu3   cpufreq
[...]

By default, all available cores in the system are enabled. To switch off any single core, execute:

Code Block
languagebash
$ echo 0 > /sys/devices/system/cpu/cpu2/online

To power up the core again, execute:

Code Block
languagebash
$ echo 1 > /sys/devices/system/cpu/cpu2/online