There is no cfs_period_us or cpu.cfs_quota_us in the cgroup

Hi guys,

I recently use cgroup to limit the resources, while when I install cgroups-lite, it shows

$ sudo apt install cgroups-lite
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package cgroups-lite

But I have successfully installed cgroup-bin cgroup-lite cgroup-tools cgroupfs-mount libcgroup1

And there is no cfs_period_us or cfs_quota_us in the /sys/fs/cgroup/cpu.

pi@navio:/sys/fs/cgroup/cpu $ ls
cgroup.clone_children cpuacct.stat cpu.shares tasks
cgroup.procs cpuacct.usage notify_on_release
cgroup.sane_behavior cpuacct.usage_percpu release_agent

My kernel is

Linux navio 4.4.36-a7765e7-emlid-v7+ #41 SMP PREEMPT Mon Mar 20 18:48:32 MSK 2017 armv7l GNU/Linux

Does anyone can help, thank you!

Hi @zivyfeng,

It seems that to enable CPU cgroup Linux kernel must be compiled with the next parameters:

CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y

You can recompile the kernel with these parameters. To build the latest kernel version use this source code.

1 Like

Hi, @tatiana.andreeva,

Thanks for the help, it works.
But it raises another problem, after compiling the kernel and rcio-dkms, PWM has failed when I run PX4.

ERROR [linux_pwm_out] PWM export failed
ERROR [linux_pwm_out] PWM export failed
ERROR [linux_pwm_out] PWM export failed
ERROR [linux_pwm_out] PWM export failed
ERROR [linux_pwm_out] PWM export failed
ERROR [linux_pwm_out] PWM export failed
ERROR [linux_pwm_out] PWM export failed
ERROR [linux_pwm_out] PWM export failed
ERROR [linux_pwm_out] PWM enable failed
ERROR [linux_pwm_out] PWM enable failed
ERROR [linux_pwm_out] PWM enable failed
ERROR [linux_pwm_out] PWM enable failed
ERROR [linux_pwm_out] PWM enable failed
ERROR [linux_pwm_out] PWM enable failed
ERROR [linux_pwm_out] PWM enable failed
ERROR [linux_pwm_out] PWM enable failed
ERROR [linux_pwm_out] PWM period failed
ERROR [linux_pwm_out] PWM period failed
ERROR [linux_pwm_out] PWM period failed
ERROR [linux_pwm_out] PWM period failed
ERROR [linux_pwm_out] PWM period failed
ERROR [linux_pwm_out] PWM period failed
ERROR [linux_pwm_out] PWM period failed
ERROR [linux_pwm_out] PWM period failed
ERROR [linux_pwm_out] PWM: Failed to open duty_cycle.
ERROR [linux_pwm_out] PWM output init failed

By the way, the PX4 version is

PX4 VERSION: v1.6.5-1492-g22b617d

when I typed lsmod it shows

Module Size Used by
rcio_spi 16384 0
rcio_core 36864 1 rcio_spi

Is there any solution? Thank you!

Hi @zivyfeng,

Have you already tried to run ardupilot? May I ask you to do it in order to make sure it works?

Hi @tatiana.andreeva,
Yes, I have run the autopilot on the new compiled kernel, and it printed PWM errors.

Hi @zivyfeng,

  • What’s the image you use? Do you use the latest Navio2 image?
  • Did you change anything else in the kernel except parameters we talked about?
  • Did you recompile rcio-dkms?

Hi @tatiana.andreeva,

Thanks for the help, I used the v4.14 version kernel code, it works. BTW, using an older version code, it still has errors.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.