Tiny Core Linux

General TC => Tiny Core on Virtual Machines => Topic started by: code on January 22, 2018, 03:45:32 PM

Title: How to automatically use HOTPLUGGED CPUs
Post by: code on January 22, 2018, 03:45:32 PM
I am using libvirt with Tiny Core guests. When I increase the number of CPUs the new CPUs are not automatically being used.

They show up in /sys/devices/system/cpu/ and I can start using them by doing

Code: [Select]
echo 1 > /sys/devices/system/cpu/cpu1/online




Title: Re: How to automatically use HOTPLUGGED CPUs
Post by: code on January 24, 2018, 11:20:32 AM
Okay I had to add a udevd rule  :)

Following this https://support.host1plus.com/index.php?/Knowledgebase/Article/View/1357/0/how-to-enable-memorycpu-hot-plugging-on-my-linux-server

I created

Code: [Select]
/etc/udev/rules.d/40-cpu-hotplug.rules
containing

Code: [Select]
# CPU hotadd request
SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"

Is this something that can be added to Tiny Core?
Title: Re: How to automatically use HOTPLUGGED CPUs
Post by: curaga on January 24, 2018, 01:28:05 PM
I think hotplugging cpus is fairly niche use, with most VM users setting the cpu count before starting?

You can either remaster the rule in, or include it in your backup and command udev to reload rules in bootlocal.sh.