can`t find "cpu.cfs_period_us" and "cpu.cfs_quota_us" in cgroup

Viewed 974

I want to limit the CPU usage of the process through CGroup.After searching for some information on the Internet, I learned that it needed to be revised "cpu.cfs_period_us" and "cpu.cfs_quota_us",but now I can`t find these two files in cgroup.

My steps are as follows

The path "/sys/fs/cgroup" already exists in my Linux system, but there are no files in it.So I mount the cgroup/cpu/ file according to the reference standard steps:

cd /sys/fs/
mount -t tmpfs cgroup_root ./cgroup
mkdir cgroup/cpu
mount -t cgroup -ocpu cpu ./cgroup/cpu/

What puzzles me is that my ./cgroup/cpu/ directory doesn't have "cpu.cfs_period_us" and "cpu.cfs_quota_us"... What's the reason? Is it a kernel configuration problem? I have these files in my ./cgroup/cpu path:

/sys/fs # ls ./cgroup/cpu/
cgroup.clone_children  cpu.rt_period_us       release_agent
cgroup.procs           cpu.rt_runtime_us      tasks
cgroup.sane_behavior   haoel
cpu.notify_on_migrate  notify_on_release

Other information

1)my linux system info

/ # cat /proc/version
Linux version 3.18.20 (gcc version 4.9.2 (GCC) ) #1 PREEMPT Tue Mar 9 03:52:45 CST 2021

/ # uname -a
Linux mdm9607-perf 3.18.20 #1 PREEMPT Tue Mar 9 03:52:45 CST 2021 armv7l GNU/Linux

2)Related kernel configuration

CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
# CONFIG_CGROUP_DEVICE is not set
# CONFIG_CPUSETS is not set
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
# CONFIG_MEMCG is not set
# CONFIG_CGROUP_PERF is not set
CONFIG_CGROUP_SCHED=y
# CONFIG_FAIR_GROUP_SCHED is not set
CONFIG_RT_GROUP_SCHED=y
# CONFIG_BLK_CGROUP is not set
0 Answers
Related