cyring / CoreFreq

CoreFreq : CPU monitoring and tuning software designed for 64-bit processors.
https://www.cyring.fr
GNU General Public License v2.0
1.97k stars 126 forks source link

Workaround for cgroup - cpuset #326

Closed cyring closed 2 years ago

cyring commented 2 years ago

CoreFreq driver is unaware of cpuset actions. Monitoring in the UI starts frozen.

For example with a cpuset "0-1,6-7"

Go to menu "HotPlug CPU" and disable all cpus which are not part of the cgroup cpuset

Monitoring should start afterward.

2022-02-25-001310_642x665_scrot

cyring commented 2 years ago

CPUSETS scripts

Sources:

Create CPUSETS

CPUSET=/sys/fs/cgroup/cpuset
SETNAME=host
HOSTCPUS="0-1,6-7"

mkdir ${CPUSET}
mount -t cgroup -ocpuset cpuset ${CPUSET}

mkdir ${CPUSET}/${SETNAME}
/bin/echo ${HOSTCPUS} > ${CPUSET}/${SETNAME}/cpuset.cpus

Delete CPUSETS

rmdir ${CPUSET}/${SETNAME}
cyring commented 2 years ago

CPUSETS scripts

Sources:

Create CPUSETS

CPUSET=/sys/fs/cgroup/cpuset
SETNAME=host
HOSTCPUS="0-1,6-7"

mkdir ${CPUSET}
mount -t cgroup -ocpuset cpuset ${CPUSET}

mkdir ${CPUSET}/${SETNAME}
/bin/echo ${HOSTCPUS} > ${CPUSET}/${SETNAME}/cpuset.cpus

Delete CPUSETS

sed -un p < ${CPUSET}/${SETNAME}/tasks > ${CPUSET}/tasks
rmdir ${CPUSET}/${SETNAME}
## Optionally
umount ${CPUSET}
rmdir ${CPUSET}

Issue

After deleting the CPUSETS and enabling the offline CPUs through the UI, two CPUs are still blocking monitoring when re-enabled.

2022-02-25-005343_642x1277_scrot

EDIT Issue is gone, it was just a matter of time !

cyring commented 2 years ago

Need to add into README.md and Wiki, the Daemon and Client necessary cgroup binding.

cyring commented 2 years ago

Now part of the README.md