SUSE/cpuset

Problems in mounting cpuset filesystem

gdmsl opened this issue · 3 comments

gdmsl commented

Hi everyone. I am trying to use cpuset but I cannot make it work since it will not mount the cpuset filesystem. I am using ArchLinux (see below) and I am having the same problem both with the cpuset and the cpuset-git package.

The error reported is:

❯ sudo cset shield -c 3 -k on
mount: /cpusets: none already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
cset: **> mount of cpuset filesystem failed, do you have permission?

My system is running ArchLinux

❯ uname -a
Linux tachanka 5.19.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 20 Sep 2022 15:17:59 +0000 x86_64 GNU/Linux

Thanks for the report. This looks like some of your systemd units use cpuset controller (you would see cpuset in /sys/fs/cgroup/cgroup.subtree_control) and hence it's not available for the shielding to mount it on v1. The cpuset tools won't work well with the unified (v2) hierarchy.

Despite slightly different error message, I'd consider this a duplicate of #45. (edit: #40 ofc)
@gdmsl maybe the suggested use of systemd directives is useful to you?

gdmsl commented

Hi. Sorry for the late answer. Not really (or I am not understanding it). I was trying to setup benchmarks for some scientific code following this set of instructions. But yes, I think it is a duplicate of #40 . Thanks!

cset shield takes most of tasks and moves them to a specific cpuset cgroup, so that they're bound to certain set of CPUs and the remaining CPUs are free (shielded) from interference. You can move most of the regular systemd workload by applying AllowedCPUs= configuration to 1st level slices and then create your own slice/service/scope that uses complementary CPUs.