/sys/devices/system/cpu/possible can be changed during runtime?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone :D

I wonder that possible-CPU-mask(/sys/devices/system/cpu/possible) can be
changed during runtime. I read that it is fixed at boot time, but I am
not sure that it is really immutable even if some cgroup or
virtualization magic is used.

I am referring to /sys/devices/system/cpu/possible file to get to know
the number of per-cpu areas. In userspace, I call `bpf_lookup_elem()` to
get values at index from BPF array map of which type is
BPF_MAP_TYPE_PERCPU_ARRAY.  And the length of the gained values is the
same with the number of per-cpu areas and in turn it is the same with
the number of possible CPUs.

I am anxious that this varies from time to time under some
circumstances. So I checked some cgroup and virtualization use-cases
which did not affect the possible-CPU-mask.

$ docker run --cpuset-cpus=0-3 -it ubuntu:20.10 bash  # cgroup cpuset
$ virsh setvcpus --current ubuntu20.10 5  # hotplug cpu while guest os is running..

But while conducting this I realized that it's not possible to prove the
immutability of possible-CPU-mask using inductive method.

Can anyone explain that it will not happen that possible-CPU-mask
changes after boot-time even with cgroup magic or some tricks from
outside of hypervisors?

Thanks,



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux